Multi-Select by Name but use Field Value

  • Solved
  • Posted 4 weeks ago

I have a multi-select field that looks at my “Organisation” post type. Is it possible when I use Voxel Tags to look at this list but return a different value from the list item’s post?

Example
I created 6 “Organisations” (stores), each store returns data only for it’s own store (via WPDataTables) using the Customer ID value.

I then created a 7th Organisation and selected the 6 stores mentioned above, these are “Child Accounts”; allowing this 7th “parent” organisation to see all 6 stores data.

This works if i set the child accounts (6 stores) ID’s manually – See Screenshot showing the middle text field with comma-separated id’s (this comma-separated list is passed to WPDataTables SQL query)

Manually typing those IDs is a pain.
I would like to create a post relationship multi-select list that allows me to select the 6 stores from the list of organisations (post type), the screenshot shows i have done this but for each of the selected Organisations, i need it to return the value of that organisation/store “Customer ID” which you can see in the screenshot (top field)

Each of the 6 organisations (stores) has their own ID (like in the screenshot), when i first create the organisation, we manually enter this which is fine but for the parent account, i want to select the stores rather than manually type out the ID’s again.

So essentially i’m looking for a sort of loop?
Foreach “Organisation” in “Child Account ID’s” return child_account_ids.customer_id

Is this possible 🙂

  • Images