Customer Engagement & Dynamics CRM Forum

Powerapps - Merge Records from Different Data Sources with ForAll and Patch

  • 1.  Powerapps - Merge Records from Different Data Sources with ForAll and Patch

    GOLD CONTRIBUTOR
    Posted May 05, 2021 11:34 AM
    Is it possible to merge records from different data sources using ForAll and Patch?

    Imagine you have a collection of three (3) records created using Data Source A (CollectDataSourceA). Using "ForAll", I want to loop through each record in CollectDataSourceA(ThisRecord) and use fields from it to build objects for Data Source B (DataSourceB).

    ForAll(
      CollectDataSourceA,

      Patch(
        DataSourceB,
        ThisRecord,
        {'Data Source B Field': ThisRecord.Name}
      )
    );

    App Checker keeps giving an error like the following:

    The column specified is not accessible in this context.

    I really need to use the values from the CollectDataSourceA ThisRecord to build Patch records for DataSourceB. Are there any strategies to circumvent this? Any suggestions would be greatly appreciated.


    ------------------------------
    Rodrick Hales
    Software Consultant
    ------------------------------


If you've found this thread useful, dive deeper into User Group community content by role