I have been trying to get a button formula to work for a while now but to no avail.
I have a Sale Order table and I need to fill a DB Clients table with the data from the former.
The thing is some clients have more than one order and that has to be filtered out, so I don’t get duplicates in the DB Clients table.
I’m sure there are other ways to accomplish this but I don’t want to use any formula or button column, as it would slow down my big doc.
The formula I wrote was:
Hi, @Paul_Danyliuk . Thanks for your help. I tried your way and it didn’t work either.
When you have two orders from the same client, the formula will not filter one out. You get duplicates in DB Clients.
If I try to run the formula again, it correctly doesn’t do anything, as the client was already added to the DB Clients.
It seems like DB Clients. Client ID doesn’t get updated while the formula runs and you get duplicates.
Hi, Paul. I got it to work now
I think it’s a bug. All I did was to envelop the condition with RunActions().
The formula was not testing the inside condition in each iteration of FormulaMap() and, I believe, RunActions() forces it to check.
The formula that works is bellow. The only difference from the first one is the RunActions()
I renamed this thread because, I believe I found a bug in FormulaMap().
As you can see in the dummy doc, it doesn’t test a condition in each iteration even when the condition is inside FormulaMap(). I believe it’s not an expected behavior. You have to use RunActions() to get it to work properly.