multiple field validation

Issue #202 resolved
Former user created an issue

Hi, I want to validate multiple field values in one condition. scenario: I have one radio button and 4 drop down list in tab, I want to validate user has to select atleast 1 field value, please let me know how to write script

%{10216}%{10215}="None"

throwing error.

Comments (21)

  1. Fidel Castro Armario repo owner

    I show you several boolean expressions:

    1) All 5 fields are set, i.e., all have values:

    %{aaaaa} != null AND %{bbbbb} != null AND %{ccccc} != null AND %{ddddd} != null AND %{eeeee} != null
    

    2) At least one of the 5 fields is set:

    %{aaaaa} != null OR %{bbbbb} != null OR %{ccccc} != null OR %{ddddd} != null OR %{eeeee} != null
    

    3) If field A is set then field B should be set:

    %{aaaaa} != null IMPLIES %{bbbbb} != null
    

    4) Exactly only one field among A and B is set:

    %{aaaaa} != null XOR %{bbbbb} != null
    

    You have more examples at documentation site.

    I'm not sure if one of these scenarios is the one you intend to implement. Please, ask me any other scenario you have.

  2. Former user Account Deleted reporter

    my requirement falls into first scenarios, I tried with this but it didn't work.

    I have drop down list value is None, please suggest on the same.

    if all the drop down list have None it should promt an error to select any one.

  3. Former user Account Deleted reporter

    I tried with %{10215}=-1 AND %{10216}=-1 %{10215}="None" AND %{10216}="None"

    but it didn't work

  4. Fidel Castro Armario repo owner

    "None" is not an actual value. You should use null instead.

    You should use a logical connective (OR, AND, IMPLIES, XOR, etc.) between %{10216}=-1 and %{10215}="None"

    Try a following boolean expression like this:

    %{10215} = -1 AND %{10216} = -1 AND %{10215} = null AND %{10216} = null
    
  5. Former user Account Deleted reporter

    %{10215} = null AND %{10216} = null is not working, i tried with reverse condition like i have 1-10 values in dropdown list, %{10215} != in(1,2,3,4,5,6,7,8,9,10)

    it is throwing parser error, and also i tried with "1","2" still throwing error, please suggest on the same

  6. Fidel Castro Armario repo owner

    Sorry Savita, I made a mistake. You should use %{10215} = "-1" for string comparisons. If your field were a Number type, then you should use something like {10215} = -1, but this is not the case.

    A valid expression is also:

    %{10215} not in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
    

    that in case those are all the possible values of the drop down list, then is equivalent to

    %{10215} = null
    
  7. Former user Account Deleted reporter

    i can able to validate with this %{10215} not in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"] it will show message like "please select" but when i select and try to create ticket it is not allowing to create still it is showing message

    i think refresh is not happening.

  8. Fidel Castro Armario repo owner

    It's very strange. What you are trying to do is very simple, and you shouldn't have any problem.

    Can we have a meeting with screen-share by Skype? I will be available since 9:30 UTC. My Skype user is "fidel100r".

  9. Fidel Castro Armario repo owner

    Can you please confirm whether we can have the Skype meeting and the hour, please?

  10. Former user Account Deleted reporter

    I don't have access for Skype here, I ll confirm you same issue I am facing for other scenario, I ll get back to you.

  11. Former user Account Deleted reporter

    Is it possible for net viewer meeting ? let me know when you are free, I will send the invite

  12. Fidel Castro Armario repo owner

    I will be available at Skype since 9:00 UTC. Can you please confirm the time of the meeting?

  13. Fidel Castro Armario repo owner

    Sorry Savita, the links your sent to me are for Windows client software, and I'm using Mac OS X. Can you please tell me how can I participate in the meeting using this OS?

  14. Log in to comment