Hi I am working in version 7.9. My requirement is I have a grid

Hi

I am working in version 7.9.
My requirement is I have a grid in which I can select rows and I have a button below. If I select more than 1 row and hit the button, I should get a validation message that I cannot select more than one. For this I am writing a condition in a!formLayout's validations{} like:

if(and(count(ri!selectedIndices)>1,ri!buttonOptionSelected="Submit"),
a!validationMessage(message:"Please do not select more than one"),{}
)

But my form completes and I don't get to see this error message.I guess this is because on hitting the button I am taken out of the form.
Can any one please guide me for the same.

Thanks in advance!!

OriginalPostID-160395

OriginalPostID-160395

  Discussion posts and replies are publicly visible

Parents
  • Hi Michael
    Thanx for replying.
    As mentioned in my query I am also putting my validations in the validations section of a!formLayout (the same is being depicted in your sample code).
    My SAIL expression is working fine but my UI doesn't stay to display the error message.
    Janak, you can refer to this sample code from Michael.
    Thanx in advance!!
Reply
  • Hi Michael
    Thanx for replying.
    As mentioned in my query I am also putting my validations in the validations section of a!formLayout (the same is being depicted in your sample code).
    My SAIL expression is working fine but my UI doesn't stay to display the error message.
    Janak, you can refer to this sample code from Michael.
    Thanx in advance!!
Children
No Data