Filter a Record Selector based on the value of another field

Hello,
i have 3 modules: Accounts, Contacts and Oppertunities.

One Account can have many Contacts.
One Account can have many Oppertunities.

Oppertunities have the fields accountid, contactid, oppertunity name (and some more).

Contacts have a field accountId, so they have a relation to Accounts.

Now when adding a new oppertunity, after i selected the account (fieldtype record selector), all contacts show up (fieldtype record selector).

However, i only want to see the contacts of the selected account. So if i select “Company A”, only contacts of “Company A” should show up in the field selection.

I tried the prefilter setting, but without any success.

Is this possible?

Hey, you can achieve that with the prefilter like you mentioned.

On the Opportunity module, edit the Contact record field and set the prefilter to
${record.values.Opportunity_account_field} = Contact_account_field

This way the Contacts in the selector will be filtered by the currently selected account field.

It works.

Thank you very much!

1 Like