I am having a table component with 4 columns say col1, col2, col3, col4. My requirement is, once the users have entered values in the TC, i want to check the uniqueness of col1 & col3.
Can anyone suggest how this can be acheieved?
You just want to check or you want to restrict user to enter dupliacte value in Col3.
I want to check and restrict the user. that is, if the user enters a value which is already present in the list, a error message to be prompted. This has to be done for both Col1 and Col3.
If you want to check that col1 and col3 should be different then it can be done via execution step, where you can check both values in a function and display appropriate error message.
If you want to restrict the user from entering same values then you can change the validation of col3 such that:
select col3_value from XXXX where value != 'selected_col1_value';
Hope this helps!!
::Click KUDOS if this helps!!
I am not sure if you got my question correctly, anyways i will explain.
my requirement is, firstly the values in Col1 shouldn't repeat and also Col3 shouldn't repeat.
For each entry in col1 there should only be one entry in col3 and vice versa.
The user can enter any values (there is no pattern enforced) in both columns.
So could please tel me, how to achieve using a function? I am trying but not getting the results.
Maybe you could do a check like this:
"SELECT COUNT(*) FROM TABLE_X WHERE VALUE1 IN(COL1) OR VALUE2 IN(COL3)"
where VALUE1 and VALUE2 are input values from the user.
Result should be 0 if values are unique and ok to add