Action Behavior condition

In the Table named CAR LOG, I have an Action called “SEND TO PAYROLL” that adds a row to another table using values from the current row. The Action becomes available when users set the value of [STATUS] to “COMPLETE”, however, I also need the expression to check for duplicates in the PAYROLL LOG table in order to prevent users from claiming commission on the same unit multiple times (Duplicates should be identified based on the value of stock numbers). Note: in table CAR LOG the column is [STOCK], and in table PAYROLL LOG the column is [STOCK#].

Something must be wrong with my expression because the expression assistant keeps saying: Unable to find column ‘STOCK#’, did you mean ‘STOCK’?

How can I get it to look at the PAYROLL LOG table to check for a duplicate value of [STOCK#]? The expression I have right now is as follows:

AND( [STATUS] = “COMPLETE”, IN( [STOCK#], SELECT( PAYROLL LOG [STOCK#] )))

In your action, your source row is from CAR LOG and you are trying to add a row into PAYROLL LOG. As you stated the column in CAR LOG, the source row, is [STOCK].

You expression needs to check that source row value does not already exist in the PAYROLL LOG table.

You were actually very close you simply need to change the expresion by removing the “#” in your IN() function like so:

AND( [STATUS] = "COMPLETE",  IN( **[STOCK]**, SELECT( PAYROLL LOG [STOCK#] )))
1 Like