set attribute value from reference selector of another entity

0
I am trying to have a reference selector on an edit page where the selected value is then used to set the value of an attribute in a different entity but cannot get it to work. The page has a data view of one type with editable fields for that object. On the page I also have a reference selector that pulls in names from a different entity. This is working. But once selected  I want to store that value in the containing page entity. This I cannot get working. The selected value is lost once the page is saved. I have tried using an on change micro flow, but the containing entity is passed in as an object and so the reference selector value is not available. I have also tried calling a microflow from the action(save) button on the edit page, but the value  is not passed there either.   Any help would be appreciated.   Best, Daniel
asked
2 answers
0

It looks like you are searching for the constrained by function. See the documentation here: https://docs.mendix.com/refguide7/reference-selector#constrained-by

It’s for Mx7 but works the same in Mx8.

Or am I missing what you are trying to achieve?

Regards,

Ronald

[edit]
Indeed pictures are a bit broken at the moment, they are working on  a fix. Some assumptions here. I assume you have two references from this object: one for the pickup point and one for the destination? Indeed a on change microflow should be the fix. You pass the current object as parameter so you can retrieve the associated pickup point and destination. You can then do the stuff you want to do with either pickup point or destination.

answered
0

I have an application with Destinations and Pickup Locations, where a Pickup Location could be used by multiple Destinations.

The reference selector should be the names of destinations, but once the form is saved I want to save the selection into the Destination Name value of the Pickup Location.

answered