Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

highlight keys that dont match and throw exception

Hi!

I have two tables.

1. Master - Defines the Items allowed

2. Trans  - The transaction on item level.

If the transaction is filled in incorrectly, and the Item number does not match the Master item, how can i throw an exception so that the user is aware.

i was imaging a popup window (visualization) based on a condition like match or can this be caught at load time and throw an error?

my application is attached below.

Best

Brad

1 Solution

Accepted Solutions
marcus_sommer

You could load your transaction with a where-clause with exists(item) but then you or your user don't know if there are incorrect data. Perhaps it is better you make a mapping with applymap - if(applymap('master', item, 'error') = 'error', 'incorrect data', 'correct data') as ErrorFlagField - and you can switch per selection between them.

- Marcus

View solution in original post

2 Replies
swuehl
MVP
MVP

You can use exists() funtion to check on field value already exists in Master table.

Maybe like attached (using an invalid statement to throw an error on load).

marcus_sommer

You could load your transaction with a where-clause with exists(item) but then you or your user don't know if there are incorrect data. Perhaps it is better you make a mapping with applymap - if(applymap('master', item, 'error') = 'error', 'incorrect data', 'correct data') as ErrorFlagField - and you can switch per selection between them.

- Marcus