I have a collection of items and I need to update each item based on a lookup in two sharepoint lists.
Like this:
collection records
ID NewValue
1 BLANK
2 BLANK
3 BLANK
I need to look up each id in a sharepoint list, get a value from the first list, look up that value in another list to return my NewValue and update the NewValue field in this collection based on what is returned.
For each record in my collection
- get value 1 from sharepoint list
- use value 1 to find another value in another sharepoint list
- return second value to NewValue field in collection
I am stumped as to the best way to approach this. TX
Solved! Go to Solution.
Hi @Anonymous see sample below. I created three collections to represent the three sources but I am sure you can substitiude for a sharepoint list. In the last collection is where it puts it all back together.
ClearCollect(
colUser,
{Name: "Paul"}
);
ClearCollect(
colSocial,
{
Name: "Paul",
Twitter: "@officpoweruser"
}
);
ClearCollect(
colWeb,
{
twitter: "@officepoweruser",
Web: "https://officepoweruser.com"
}
);
ClearCollect(
colCombinedSub,
AddColumns(
colUser,
"TheSocial",
LookUp(
colSocial,
Name = Name
).Twitter
)
);
ClearCollect(
colCombined,
AddColumns(
colCombinedSub,
"TheWeb",
LookUp(
colWeb,
twitter = twitter
).Web
)
)
---------------------------------------------------OfficePowerUser.com----------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members. If you thought this post was helpful, please give it a Thumbs Up.
Hi @Anonymous see sample below. I created three collections to represent the three sources but I am sure you can substitiude for a sharepoint list. In the last collection is where it puts it all back together.
ClearCollect(
colUser,
{Name: "Paul"}
);
ClearCollect(
colSocial,
{
Name: "Paul",
Twitter: "@officpoweruser"
}
);
ClearCollect(
colWeb,
{
twitter: "@officepoweruser",
Web: "https://officepoweruser.com"
}
);
ClearCollect(
colCombinedSub,
AddColumns(
colUser,
"TheSocial",
LookUp(
colSocial,
Name = Name
).Twitter
)
);
ClearCollect(
colCombined,
AddColumns(
colCombinedSub,
"TheWeb",
LookUp(
colWeb,
twitter = twitter
).Web
)
)
---------------------------------------------------OfficePowerUser.com----------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members. If you thought this post was helpful, please give it a Thumbs Up.
Thank you this worked perfectly!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
179 | |
67 | |
36 | |
33 |
User | Count |
---|---|
341 | |
271 | |
113 | |
74 | |
58 |