Skip to main content

Notifications

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
    CP-11092133-0 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
    FLMike Profile Picture
    FLMike 27,286 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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,696

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,456

Leaderboard