Forum Discussion

DonLarson's avatar
DonLarson
Qrew Commander
2 months ago

Prevent Duplicate Entry from a Record Picker

The objective is to prevent adding a child record to a parent a second time from a record picker.

A simple business case is adding parts to a Bill of Material from an Item Master.

A given Assembly might need 30 parts from the 10K in the Item Master and I am trying to make sure that the User cannot pick the same one a second time.


------------------------------
Don Larson
------------------------------

6 Replies

  • How are they being added? Grid Edit? Will a simple formula text field that you concatenate Related Assembly & Related Item Master that you set to unique suffice? 



    ------------------------------
    Chayce Duncan
    ------------------------------
    • DonLarson's avatar
      DonLarson
      Qrew Commander

      It is an Add button, no grid edit.

      On the concatenated field, I assume you are thinking about flying a Custom Data Rule to intercept and prevent the Save.    That will functionally work but is a sub optimal user experience.

      If you have way to use that combination to reduce the Record Picker list, I would love to hear it.



      ------------------------------
      Don Larson
      ------------------------------
      • ChayceDuncan's avatar
        ChayceDuncan
        Qrew Captain

        Ah I see now what your true end goal is. Apologies for not seeing it at first. I don't believe there is a way unless you flip the idea of where the reference field is sourcing from. If you're record picker sources against the Master tables then I don't believe its possible with the native record picker given that the master has no direct tie to the child table for the record picker to conditionally filter against. The only way I could think would be to create a new table that creates a kind of snapshot of the options that you set the record picker against where it's directly related to the Assembly and then you can create the bindings since it's now Assembly specific, but given that you have 10K items that's likely not feasible. Your best bet is to try and catch it on the form while they're entering with a formula query to check if that combo has been used, and if it finds a match clear out the related field and make them repick. 



        ------------------------------
        Chayce Duncan
        ------------------------------