Is there any way one can search a custom field name, if the field name itself is a variable?
I’m dealing with two channels: MasterTable and Sections
MasterTable has 20+ custom fields with DropDown formatting.
Sections has a Matrix field with 2+ rows per entry and a custom field called CFShort (both text)
In a perfect world, I need my page to:
- randomly select one of the Section entries (returning CFShort)
- randomly select one of the rows from the Matrix field within this Section entry (returning Option)
- randomly select three entries from MasterTable with a custom field short_name that matches CFShort and has a result that matches Option
Now I know this has to be possible, and I get close by using search:field_name BUT only by hardcoding the field_name in there…I need it to be dynamically selected from the previous channel query. I can easily grab the first two items above—it’s the third that causes me grief.
Ultimately I would like this to work:
{exp:channel:entries channel="MasterTable" orderby="random" limit="3" search:{CFShort}="{Option}"}But the whole parse order prevents it from working…
I’m close, but I just need to work out the logic…any takers?