cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marc2510
Helper II
Helper II

Patch lookup column when using ForAll

I'm looking to patch data using a ForAll ( giving a tasks to each individual schools to update)

 

but I cant find a way to patch a lookup column called "lookup"

 

Capture.PNG

 

ForAll(Choices(Compliance_List_SCC.School),

Patch(Compliance_List_SCC,Defaults(Compliance_List_SCC),

{Title:TextInput3.Text,School:ThisRecord,Dept:Dropdown3_3.SelectedText,Lookup:Dropdown4.SelectedText}))

 

Capture2.PNG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

I just did a simple test and it worked fine. What is the formula in the Items property of the dropdown4?

 

In my test case DataCardValue15 has the Items property set to Choices([@PowerAppsTestList].LkupColor), so I know I am getting the complete item record.

 

Patch(
    PowerAppsTestList,
    Defaults(PowerAppsTestList),
    {
        Title: DataCardValue16.Text,
        LkupColor: DataCardValue15.Selected
    }
)

 

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Jeff_Thorpe
Super User
Super User

Try using .Selected instead of .SelectedText with those dropdowns.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

tried that’s still no joy 😞

Jeff_Thorpe
Super User
Super User

I just did a simple test and it worked fine. What is the formula in the Items property of the dropdown4?

 

In my test case DataCardValue15 has the Items property set to Choices([@PowerAppsTestList].LkupColor), so I know I am getting the complete item record.

 

Patch(
    PowerAppsTestList,
    Defaults(PowerAppsTestList),
    {
        Title: DataCardValue16.Text,
        LkupColor: DataCardValue15.Selected
    }
)

 

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

marc2510
Helper II
Helper II

Thank you so much 🙂

 

if anyone else ever come across this ( and was a bit dim like me!)

 

I was originally trying to force the values in to the dropdown via ["example1","example2"] for choices instead of 

Choices(Listname.Lookup)

 

 

 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,262)