Epicor Functions and BAQs

This is going to go on my parmarent record, isn’t it?

Thanks Mark. I will try to play around and see if I can make it work. So far it compiles and run, but no records returned. I wonder if we need to do similar expressions for other bindings?

The DynamicQuery has two datasets, one for the parameters and another for the parameter values sent for execution. You might want to fill the Parmameter Values dataset with a Fill by Query and then do an Update By Query to update the values.

I’m surprised our resident expert on Widgets (@JasonMcD) hasn’t jumped in. I’m sure he has a slick example. :popcorn:

1 Like

Yet again, definitely not an expert.

Ha, actually I am “watching” this thread out of curiosity as to how this is solved. I’ve had the same question myself in the past. I never asked because I think I was so new to functions at the time that I figured I wouldn’t even understand the answer.

And then the whole “deserialize this json text” might be a deal-breaker anyway.

sign language bullshit GIF

Remember, you’re an expert relative to the coders here.

New Blood Smile GIF by Dexter

1 Like

I’m screwing with it, but it’s not going well.

At this point I’m boiling it down to the simplest and most readable custom code block I can.

1 Like

At this point, I’m boiling it down to the simplest and most readable custom code block widgets I can.

1 Like

Without calling yet another query, I can’t figure out how to add more than 1 row to a query
inside with widgets.

I could use row_number to generate some, but need a way to limit the number of rows

getting pretty complicated

At this point, I’m boiling it down to the simplest and most readable custom code block widgets I can..

Here is what I did, I put the execution parameter additions in their own custom code block.
Simple as I could make it.

my variable was qeTS (QueryExecutionTableset)

  qeTS.ExecutionParameter.Add(new ExecutionParameterRow
  {
      ParameterID = "Parm1",
      ParameterValue = "Chicken Parmesan Is Delicious!",
      ValueType = "nvarchar",
      IsEmpty = false,
      SysRowID = Guid.NewGuid(),
      RowMod = "A"
  });
  
  qeTS.ExecutionParameter.Add(new ExecutionParameterRow
  {
      ParameterID = "Parm2",
      ParameterValue = "I put this on Mark's permanent record.",
      ValueType = "nvarchar",
      IsEmpty = false,
      SysRowID = Guid.NewGuid(),
      RowMod = "A"
  });

At this point, I’m boiling it down to the simplest and most readable custom code block widgets I can.

Go home @knash , you’re drunk.

So you can create a variable and increment it at the end then loop back to the beginning using that variable as an array index and a condition widget where indexvar<2

Effectively looping with the widgets it’s awful and ugly but it does work

2 Likes

I was trying that, but how do you add another row to the execution parameters.
That’s where I’m lost.

Here’s one we did recently

1 Like

You call GetNew on it on the BO there is a GetNewExecutionParameter call (or something similar)

Ok, but now add it to the execution Parameter table…
And you can only use widgets.

When you call GetNewExecutionParameter you pass on execution table set and the new row is automatically added to that table.

I’m on my phone so I can quite test it but it should work

1 Like

I’ll try it

Love your humor.

I hope you are going to Insights so we can meet up and toast a beverage of choice.

1 Like