Hide drop down place holder

We have an editable grid, populating its column data from three dropdown boxes as shown in image. The values in the third box is dependent on the values the user selects in the first two drop down boxes. They are pulling the data correctly.

Now, in the third column if the result of the choices the user makes in the first and second column is only one item in the drop down list. We want to hide the dropdown placeholder and instead update the drop down directly with that resultant value. Please, can you give an example of how to do that?



OriginalPostID-216957

OriginalPostID-216957

  Discussion posts and replies are publicly visible

Parents
  • Most likely the best way to do this is to make a more complicated saveInto structure in the other dropdown components to choose that value for you

    It would look like this for both dropdowns, so that the order wouldn't matter

    saveInto:...
    if(
    /*Conditional to check that both dropdowns are selected*/
    and(ri!cdt[index].entityType = "Individual",ri!cdt[index].ownershipRole = "Primary"),
    a!save(ri!cdt[index].entityRole, "Value I Want"),
    {})

    You can also use the conditional above to populate the disabled: field of the Entity Role column, so that a user cannot change this saved value while individual and primary are chosen.
Reply
  • Most likely the best way to do this is to make a more complicated saveInto structure in the other dropdown components to choose that value for you

    It would look like this for both dropdowns, so that the order wouldn't matter

    saveInto:...
    if(
    /*Conditional to check that both dropdowns are selected*/
    and(ri!cdt[index].entityType = "Individual",ri!cdt[index].ownershipRole = "Primary"),
    a!save(ri!cdt[index].entityRole, "Value I Want"),
    {})

    You can also use the conditional above to populate the disabled: field of the Entity Role column, so that a user cannot change this saved value while individual and primary are chosen.
Children
No Data