Forum Discussion

MarkShnier__You's avatar
MarkShnier__You
Icon for Qrew Legend rankQrew Legend
3 years ago

Conditional Drop Down in Grid Edit based on a lookup field

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
------------------------------
  • 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
    ------------------------------
  • A bit late but thought its worth sharing for others in the future.

    The conditional dropdown list will work in legacy forms with a grid edit table in edit mode with a lookup condition if the condition that is also the proxy field. The proxy field is prefilled in the grid edit tables in the legacy forms like the master related field.

    Tested it on my side and worked. The only down side is that my proxy field is now taken.

    • jross's avatar
      jross
      Qrew Cadet

      Hey Efvrno,

      It's crazy that you just made this post as this is a problem that my current company has going on right now.  I built out your idea in a test environment but the proxy field does not pre-fill in the form like the related field does.  Is there any other trick to this?

      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        .. are you in Legacy Forms?  This only works in Legacy forms at present, not New Forms.