I’m trying to create the correct expression to for the data source for my drop down menu. I want the data to be all the unique Vendor names from the ‘NewOrder’ type in the database. So far, I’ve only returned all New Orders, sorted by Vendor, with repeat vendors listed.
Here is a link to the issue in the public forum app:
Have you try to swap the order of unique and filtered? I think the general rule is to reduce the dataset as much as possible before applying filtering.
It might not help fix the problem, but should be more efficeint.
@DaveA, Thanks for your reply. Swapping unique and filtered still produces the same result: a list of all live orders sorted by vendor with vendor repeats.
"I would create a new data type called Vendor, and a field within that data type called “Name” (to store the name of the Vendor). In the New Order data type, the Vendor field would be “Name of Field: Vendor, Type: Vendor, List: No” instead of “Name of Field: Vendor, Type: Text, List: No”.
Then in your dropdown, you can have the data type be Vendor, choices Sources be: Search for New Order’s Vendor, and Option Caption: Current Option’s Name.
I just updated the forum app example with the new fields. If you look at the New Order data type, the Vendor field now contains the the unique ID of the associated Vendor.
It looks the same as when you had it, but it’s actually removing the duplicate data problem from before. If you go to the Vendor data type you’ll see no duplicates: