Flic Buttons and Rest

So now I have a question for DataDirectives and rest Post commands. If I run a post command, it will create, or update based on whether or not those keys exist. With these buttons, my rest call is static. I can’t change anything that get’s set, I just set up the button to send the call. For any other logic, it needs to be done on the Epicor side. So for my example, I want key 2 to be the date, because I want to allow one click per day. So in my in-transaction data directive, I have


to set key 2. That works fine. Or I could set it to


I get a time stamp, so I can keep writing new rows every second if I want.

So the next thing I want to do is take a row that already exists, and update a field in the UD table (not a key) with the date time stamp of when the button was last pushed.

So I set the Key2 to the Today setting, and it doesn’t make a new row (as per design). But I can’t get it to update another field with the time stamp of the last push.

Here’s the editor of my BPM

I am thinking that the row selection is happening before the in transaction directive, and even though I am “setting” the key2, all that is doing is preventing me from over writing the existing line. So it’s not letting me update the line that’s there since the date (key2) isn’t actually being sent in the rest call.

So I need to figure out how I can send a hard coded rest line and be able to choose the row to update from within the BPM so that I can choose whether to create or update a line.

Anyone have any ideas on how I can do this?

Is this possible?

You have utterly confused me… LoL I would suggest a UBAQ instead that gives you greater flexibility to look up the records and or update them or create them if they don’t exist.
So your logic lives in the UBAQ

1 Like

So, what is the extra functionality that I would get? I should be able to run data and method directives on update ext which would be the same as the UBAQ (I’m working with a UDtable). The interface for the flic buttons don’t have lookup capability, only the ability to send a typed http request. So other than separating the BPMs to only run with the baq, and maybe initializing some values by lookup, what else would the UBAQ do for me? Honestly curious.