Help

Re: Find value removed from Array

333 0
cancel
Showing results for 
Search instead for 
Did you mean: 
testtest49
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi all,

I'm building an advertising database for a publishing/newspaper company. I have an automation that whenever an ad order is placed in one table A, takes Record Name X (Ad order number) and Values Y (Issue #s) and makes a record in table B for each (XY1, XY2, XY3).

This is effectively our ad order history.

Is there a away to automate so if the ad order in table A is changed, say an issue 3 (y) is removed, I can identify what value was removed and go and find that entry in table B and check a box that says "ad cancelled?"

And conversely, if an issue is added to an ad order, could I identify what issue number is added and then generate a new record in table B for it? (Say XYIssue5)?

Thanks!

1 Reply 1

Hi,

It's quite hard because you need to count existing records in B and then apply conditional logic if their number less or more than value Y from table A. Then you will find record(s) to check a box and you cannot apply repeated action because you used conditional logic. And there is no action to substract from list of values to know what record must be added;.
You may use workarounds using a bit scripting to retrieve single ID from 'Find Records' result, or to get a last value from list.

But I think you should use linking and it's features. When you add " x1, x2, x5" into linked field, it will link to respective records in linked table, and if such records absent, create them. So, if somebody add, for example, x8, you just put result to linked field (" x1, x2, x5, x8"), and fourth record will be auto-created and linked. And if somebody remove, for example, x2, you put " x1, x5, x8" to linked field. Record x2 will remain but became unlinked.
I think, that provide main functionality, and 2 more automations needed to support:  when record created in B, fill it with respective data (taken from linked record in A). When record in B loses its link, mark it as 'cancelled'
But that may be implemented in different other ways.