I’m building an interface where users create a new shipment (card widget), and then select from a list of unshipped tissue samples to add to the shipment. I’d like the selection to happen with a toggle button, and to put a trigger formula on the reference column to link a sample to the new shipment.
So, the behavior is the same as what is automatically done when creating a new record with linked widgets.. but expressed in a trigger formula. I can’t use linking to accomplish this, because the samples are not linked until the user links them.
I can have them select from a choice list, but check boxes would be a much better interface.
Thanks for the help!
One thing that comes to mind is if you are OK creating a special record that would designate the “next shipment to be filled”. I.e. add a table called “Next shipment”, with a single row, and a single cell, containing a reference to the shipment to be filled. Then whenever you toggle on a sample in your table of samples, you can have a trigger formula look up that shipment, using a formula like Next_shipment.lookupOne().Shipment.
Thank you Dmitry! This was a good starting point for me.
I was eventually able to get the behavior I wanted by creating a custom widget to update the value in the “Next Shipment” helper table when a user selected a pending shipment in the shipment table, and then using this value in my lookup trigger formula.
It would be a pretty cool addition to the API if the selection state / data of an individual widget was available directly in formulas without a workaround. But thanks again for your help with finding a solution.
1 Like
Any chance you could share that custom widget? I’m looking at doing basically the same thing, and it would be a wonderful addition.