When am trying to update the editable grid , the attached code throws an error

When am trying to update the editable grid , the attached code throws an error
Expression evaluation error in rule 'rule': Cannot select without a Value
Any solutions/changes to the code?


Sample Code

OriginalPostID-158041

OriginalPostID-158041

  Discussion posts and replies are publicly visible

Parents
  • @janakik Hi, spotted the issue. In the grid row lay out rule, you defined a rule input named 'staffingDetails' but in the apply component you are not passing the values to the input but you are passing the values to an input named 'items' which actually doesn't exist.

    a!applyComponents(
    function: rule!CSI_renderCSIStaffingDetails(
    items: local!staffingDetails,/*It shouldn't be items, infact it should be 'staffingDetails' as per the inputs of CSI_renderCSIStaffingDetails*/
    index: _
    ),
    staffingDetails: if(
    or(
    isnull(
    local!staffingDetails
    ),
    count(
    local!staffingDetails
    ) < 1
    ),
    {},
    1 + enumerate(
    count(
    local!staffingDetails
    )
    )
    )
    )

    Please find attached the updated code and now it works to the best of my knowledge!!
Reply
  • @janakik Hi, spotted the issue. In the grid row lay out rule, you defined a rule input named 'staffingDetails' but in the apply component you are not passing the values to the input but you are passing the values to an input named 'items' which actually doesn't exist.

    a!applyComponents(
    function: rule!CSI_renderCSIStaffingDetails(
    items: local!staffingDetails,/*It shouldn't be items, infact it should be 'staffingDetails' as per the inputs of CSI_renderCSIStaffingDetails*/
    index: _
    ),
    staffingDetails: if(
    or(
    isnull(
    local!staffingDetails
    ),
    count(
    local!staffingDetails
    ) < 1
    ),
    {},
    1 + enumerate(
    count(
    local!staffingDetails
    )
    )
    )
    )

    Please find attached the updated code and now it works to the best of my knowledge!!
Children
No Data