Discussions

 View Only
Expand all | Collapse all

Conditional Drop Down in Grid Edit based on a lookup field

  • 1.  Conditional Drop Down in Grid Edit based on a lookup field

    Posted 02-23-2022 18:29
    Edited by Mark Shnier (Your Quickbase Coach) 02-23-2022 18:37
    I would like to set up a conditional drop-down for data entry in an embedded grid edit report while sitting on a parent record in edit mode. The conditional drop-down will depend on a value which is looked up from the parent record. In my use case let's say we have two company numbers,  company 1 and company 2 and I want the conditional drop down to only offer products for the company that the Parent record is associated with. 

    My problem is that when I go to do the data entry in Grid Edit the record does not yet exist so the look up doesn't exist so the conditional drop down fails.   The only workaround I can see which I don't like it all would be to have a button which would automatically add blank child records when pushed and then put the parent record into edit mode. That way the children will exist and the look up will exist. But then I need a process to be deleting those unused blank rows all the time.

    Any other bright ideas?

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------


  • 2.  RE: Conditional Drop Down in Grid Edit based on a lookup field

    Posted 02-23-2022 19:25
    Well my solution was that since I actually only do have two companies I can have a different embedded grid edit report based on form rules because the form will know what company I'm dealing with. Then I specified a dummy Grid Edit form to use for Grid edit and filtered the drop-down list that way.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------