Hi All, I have a grid and it that grid edit functionality is provided. I need to make sure that when user click on edit, the duplicate values should not be entered. Can anyone please help me out.
Discussion posts and replies are publicly visible
This is what validations are made for.
But we have non editable grid aready implement and need to to apply such validation.
So you do NOT edit the data directly in the grid?
Then, validations are still the way to go. You just need to implement the logic to detect duplicates and use that on the input fields.
Yes, when we click on edit then for duplicates we are displaying message and disables the submit button. But the same functionality working for current edited value and it dies not allow the user to approve through the button as it gets disabled.
I think I am missing something here ?!?!?
Can you explain in more detail and post some screenshots?
You seem to have some logic which works in one case, but not in another. Without more details I will not be able to support you.
I think both Stefan and I are pretty unclear what your actual use case is. I suggest starting at the beginning and giving us a step-by-step description of what you would expect the user experience to be, including which of those expectations you're currently unable to meet. By that I mean you should write it out step-by-step giving details, instead of a vague overview that requires us to just guess at what you're really after.
Ok, so here is the case,when a user click on edit button for a row in non editable grid, a new page layout appears as shown below:
There we have applied validation for warning message for duplicate values. But the current edited value
is also showing the warning message as it already exists and I do not want the message to be displayed for current edited value. Please let me know if I am able to make the requirement clear.
Please share the code underlying at least that validation message (but preferably the entire field). Be sure to use a Code Box for readability here.
Hm ... that would require some state management in the interface. An idea might be to have a local variable which tracks whether you modified the value. Then you could display the validation message only as the value has been modified.
Is this what you are looking for?
Stefan Helzle said:that would require some state management in the interface
If the row-click action just records the index of that row, and the subsequent edit field writes directly into that row (for example), then not necessarily. But it depends so much on the particulars of the current attempted implementaiton that I find it useless to even try guessing at it until more details are provided.
© 2023 Appian. All rights reserved.