Form Change Result Alternate Column

Hello,

I am attempting to implement cascading lookups in a form and have read various forum posts that have been very helpful. I have had success with some of the simpler scenarios but am having trouble with the below:

I have an Add form for the ProductionTime table. After a user selects an OperationKey from the lookuppopup, I would like to filter the options for StationKey by the same DepartmentKey that is associated with the previously selected OperationKey.

I know how to capture the selected OperationKey with a Change event, but how do I use that to capture the relevant DepartmentKey so I can pass it to a filter property?

Thank you,

Zach

You need to get the selected operation data item somehow. You can use the JavaScript Array.find method to do so:

${getOperationsResult.find(o => o.OperaitionKey == selectedOperationKey).DepartmentKey}

1 Like

Thank you @korchev! This works great and will be very useful going forward!