Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 6T2+RoyZcvG2sxEtZRd7Mu
Power Apps - Power Apps Pro Dev & ISV
Suggested answer

Patching 2 multi-select lookup columns from a form

Like (1) ShareShare
ReportReport
Posted on 11 Sep 2024 21:42:42 by 4
I figured out how to patch one multi-select lookup column to my SharePoint list but I can't figure out how to do it for my second column.  How would I do it for DatacardValue24.SelectedItems from the same record?  I just need help with the ForAll statement below,
 
 
ForAll(
    DataCardValue42.SelectedItems,
    Collect(
        colProducts,
        {
            Id: ThisRecord.Id,
            Value: ThisRecord.Value
        }
    )
);
Patch(
    NRGForm,
    Defaults(NRGForm),
    {
       
        DXProducts: colProducts
       
    }
);
ClearCollect(colProducts, Blank());
Set(varStep, 1);
If(varLegacy = true, Navigate(scrRedirect), Navigate(screenSuccess));
ResetForm(frmDXStep1)
  • CP-11092133-0 Profile Picture
    4 on 12 Sep 2024 at 00:19:48
    Patching 2 multi-select lookup columns from a form
    @FLMike I've tried that but it throws errors with  the second ID: ThisRecord.ID and ThisRecord.Value
    \
  • Suggested answer
    Michael E. Gernaey Profile Picture
    38,804 Super User 2025 Season 1 on 11 Sep 2024 at 22:37:34
    Patching 2 multi-select lookup columns from a form
    Hi
     
    You are saying your ForAll works properly, you just need to add Another with another collection, so literally just duplicate that code add a new collection and add the additional Property (that needs the second collection)
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,692 Most Valuable Professional

Leaderboard
Loading started