Create record filters to use with different relationships that point the same table (city address)
Hi there!
Say I have several record types that have a postal address.
For each record type, I have to do an advanced search on the address related to the record type
I would like to use a rule to create the filter, and use the rule instead of repeating the code each time. But for this to work, it looks like I have to pass each field as a separate input to my rule.
a!queryFilter(
field: ri!inputFieldCountry,
operator: "=",
value: ri!searchCriteria.country,
),
a!queryFilter(
field: ri!inputFieldDistrict,
operator: "in",
value: ri!searchCriteria.district,
),
[...]
Is it possible to only pass the *relationship* as input, and then say to Appian to look for the field within that relationship? I don't think it's possible, but sometimes I get surprised by some Appian magic.
Here is what I tried, to no avail yet.
a!queryFilter(
field: ri!relationshipToAddress[{recordfieldCountry}],
operator: "=",
value: ri!searchCriteria.country,
),
a!queryFilter(
field: ri!relationshipToAddress[{recordfieldDistrict}],
operator: "in",
value: ri!searchCriteria.district,
),
[...]