
Announcements
Hello, I have two Sharepoint list:
What i want to achieve is to have a collection of objects with two columns: User (which will contain the Object User)andStatus (which will be just a static string "willPartecipate").The users should be all the partecipants specified in the Event SP list, but the User object should be grabbed on the Users SP list
I tried this way:
- generated a table of all partecipants with a split on the Partecipants column of Events SP list (which generates a table with a Value column)
- looped in the table with a for all
- added the user inside a collection with a lookup on the Users SP list
this is my code
ForAll(
Split(
LookUp(Events, EventID = varID).Participants,
","
),
Collect(
List,
{
User:LookUp(Users,Email=ThisRecord.Value).User,
Attend: "yes"
}
)
)
the problem is that inside the collection ThisRecord.Value isn't recognized as the ThisRecord seems to be linked to the Users table. how can i refer to the Item that i'm looping on?
how to fix?
thank you so much
p.s. i'm aware that i shouldn't use the list of emails inside a string, but it's a requirement i have to deal with
Try something like this:
ForAll(
Split(
LookUp(Events, EventID = varID).Participants,
","
) As userEmail,
Collect(
List,
{
User:LookUp(Users,Email=userEmail).User,
Attend: "yes"
}
)
)If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers!
Rick Hurt