Solved! Go to Solution.
For the statement above - my suggestion when you are running into errors for complex computed columns is to break them down into individual statements. This will allow you to test the logic in a more localized manner. When I did this with your example, I saw a few things:
Statement #1 contains a syntax error and a missing element. In looking at it, I see:
If (((@Country Match in Update@ = "All Match),
It should be: If (((@Country Match in Update@ = "All Match"), "All Match"
That seems to be a consistent error in each of your statements. The syntax is:
IF (test condition,"a","b"). You need to include the "a" for each IF clause. There should only be 1 "b", but for each IF, there needs to be a corresponding "a".
In reviewing your statements, you are omitting the "a" at the end of each clause. Your statement should look more like this:
IF(@Country Match in Update@ = "All Match", "All Match",
IF(@COUNTRY_OF_SALE@ = @COUNTRY_OF_SALE_CLEAN_MFG_MPN_MATCH@,"Match",
IF(and(@COUNTRY_OF_SALE_MFN_MPN_MATCH@ = @COUNTRY_OF_SALE_META_MFN_MPN_MATCH@, @COUNTRY_OF_SALE_META_BRAND_MPN_MATCH@=@COUNTRY_OF_SALE_EAN_UCC13_MATCH@, @COUNTRY_OF_SALE_GTIN_MATCH@ = @COUNTRY_OF_SALE_EAN_UCC13_MATCH (1)@ ), "Match","Mismatch")))
The way Paxata will work is that for each record, we will evaluate the first condition in the statement. If it's a positive result, we stop looking, take the answer associated with the first statement, and then move to the next record.
If the first condition renders a negative response, we then move to the second statement and follow the same pattern. If the 2nd condition tests for true, we stop. Otherwise, Paxata then moves to the 3rd statement. If the 3rd statement is false, and there are no other statements, we then answer with the "b" response.
In terms of your question about max columns - that is dependent on your guardrail setting. If you hit the max columns, you will receive an error message.
Write each statement on its own, validate the logic, then try and merge them together.