Hi everyone
I have a form (custom list in Sharepoint 2010) with a multichoice box which gets its data from a secondary data source (another list in Sharepoint).
The users selects one or many of the choices in the multichoice box.
I have a text field (Email) of which I want the choices made in the multichoice box to be concatenated with a ";" between, however I don't want the 'Value' or Title as it's known in the secondary data source list, I want the email addresses (another field in the secondary data source list).
I have the following working in designer/preview:
substring-after(eval(eval(Value, 'concat(xdXDocument:GetDOM("NotifyList")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Email[../d:Title = current()], ";", " ")'), ".."), ";")
Example
Multichoice box list: Title, Email, ID
1 Red (1)
2 Blue (2)
3 Green (3)
User selects 1, 2 and 3 and the Email text box shows 1@red;2@blue;3@green
In the Browser, the following occurs:
Users selects 1 - email text box shows 1@red;
User selects 2 - email text box shows 2@blue;2@blue
User selects 3 - email text box shows 3@green;3@green;3@green
I've read so many blogs/forums on double eval and I am not a developer - I can only assume its the "current()" that's not working correctly on the browser?
Hope this makes sense - any ideas please let me know!