hi all
i have a use case and i am not sure how to get through this.
so attached is the file showing expenses by employees
i want to check the data and see that expense type fuel and mileage should not be charged under one reportid
and
second test will be
rental and fuel should be charged under same reportid
Please note- if possible other columns should be present in the output as well.(i have removed few columns due to its non usage)
Can you share the expected output, so it's easy to understand and apply the logics.
I had used formula tool
FuelFlag: IF [Expense Type] = "Fuel" THEN 1 ELSE 0 ENDIF
RentalFlag: IF [Expense Type] = "Car Rental" THEN 1 ELSE 0 ENDIF
and then summarize tool
Summarize Tool:
Group by report id
Sum fuel flag
Sum rental flag
and finally used formula tool
IF [Sum_FuelFlag] > 0 AND [Sum_RentalFlag] = 0 THEN "Exception"
ELSE "OK"
ENDIF
not sure if this will give correct output
@Kiara16 are you wanting the workflow to throw an error if this happens? You can use the test or message tool to run these formulas and throw errors in the workflow if they don't pass. I have found this very helpful in error handling within my workflows. I am working on building a demo now to post for you.