Drop down with Add on the Fly - How to default a field in the new entry with a value from the existing form

I have a truck Receiving Form where the user indicates which Division their receiving from.
The same form has a trailer dropdown box for the driver to select the trailer their unloading to.

When they add a trailer into the drop down box from the Receiving Form, I need the division on the receiving form to populate the division field of the new vehicle theyโ€™re inputting so administrators know which division is inputting new trailers.

I tried this expression in the Initial Value of the Vehicles (Trailer Storage) table but it doesnโ€™t recognize the receiving_id field as its from the Receiving table and generates an error.
IF(CONTEXT(View)=โ€œScale Receiving Entryโ€,[receiving_id].[Division],"")

Any ideas on how I can populate the field? Thanks so much!

Receiving Form


Add Trailer (Vehicle) Form

Add Vehicle Form

0 2 120
  • UX
2 REPLIES 2

I donโ€™t think this will be possible โ€œon-the-flyโ€. Since the record from the first form hasnโ€™t been saved yet.

You could setup an action that runs on form-save, which executes another action on the vehicles table, thatโ€™ll update the column, using a formula such as:

LOOKUP(
  MAAXROW( "truck receiving table" , "_RowNumber" ) ,
  "truck receiving table" ,
  "key column" ,
  "return value"
)

Thanks Marc, Iโ€™ll check into this as an option

Top Labels in this Space