Editable Grid Validation

Certified Senior Developer

Hi Can you guys help me with the code I am trying to give validation for the condition so for  Add client  Dropdown there should be only one active status if same occurs it should throw an validation error.

The issue is I tried using whercontains but add client and is active ....data type are different so it is not working

  Discussion posts and replies are publicly visible

Parents
  • We have to use wherecontains() only, the logic needs to be like as below. If you experience data type different error on contains() / wherecontains() fucmtion try casting with tostring, touniforstring, tointeger, etc... functions..

    Logic:

    if(
    count(
    wherecontains(
    "Active",
    touniformstring(
    index(
    local!data.status,
    wherecontains(fv!item.type, local!data.type),
    {}
    )
    )
    )
    ) > 1,
    "Only one Active row allowed for each Type",
    ""
    )

Reply
  • We have to use wherecontains() only, the logic needs to be like as below. If you experience data type different error on contains() / wherecontains() fucmtion try casting with tostring, touniforstring, tointeger, etc... functions..

    Logic:

    if(
    count(
    wherecontains(
    "Active",
    touniformstring(
    index(
    local!data.status,
    wherecontains(fv!item.type, local!data.type),
    {}
    )
    )
    )
    ) > 1,
    "Only one Active row allowed for each Type",
    ""
    )

Children
No Data