Thanks for looking into this. Interresting to understand, even if I can make it work now…
I’ll try and explain better (my english is not great). To simplify, I took a shortcut explaining the issue above last time, but that might have done the difference… (but I think not…). Anyways, here is the full story:
I have a table with “COMPANIES” and a dauther table “PERSONS”. Names and emails++.
I have a table with “PROJECTS”, and a dauther-table with “PROJEKT_PARTICIPANTS”.
Both have a REF, and is a part of mother-table. (Through (1)Companyname and (2)Projectname.
So to add [PARTICIPANTS] into “PROJEKT_PARTICIPANTS” from “PERSONS”, I do this:
“PROJEKT_PARTICIPANTS” has a column [COMPANY_NAME] so I first can narrow down optinal names to choose from (also easier to find). Here I use REF to “COMPANIES”
Once the company is chosen, the next column in “PROJEKT_PARTICIPANTS” is [Name].
Here I use: "Select(PERSONS[Name], ([COMPANY_NAME]=[_Thisrow].[COMPANY_NAME]))
I use this in Valid if, and text. So only employees in that company, is shown in my dropdown.
In next column I also collect his email in formula: “Lookup([_Thisrow].[Name], PERSONS, Name, Email)”
So now, I have name and email in “PROJEKT_PARTICIPANTS”.
From here, it’s basically what I explaind i my post above.
I have several different reports, typically a deviation report, users can send, and in these they can choose whom to send to in an enumlist, “checking” of several names.
In [Send to] I use:
Used in Suggested values and as enumlist.
The [Projectname] is chosen in a previous column in the deviation report by using REF to “PROJECTS”.
Next I have a column to get the list of their email adresses (for later to use in a workflow).
Here I first used (in initial value):
Here, the result was:
If I pick 1 name, I get his email adress 3 times.
If I pick 2 names, I get their email adresses 3+4 times.
If I pick 3 names, I get their email adresses 2+3+4 time
But when I wrapped it in “Unique”, it worked perfect.
But still curious if this is the best way. Does it slow my APP down more than nessesary?
And the easter mystery remains: Why did it collect the emails multiple times… (still does underneath, I asume)