Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Patch Multiple Galleries to SharePoint List

(0) ShareShare
ReportReport
Posted on by 4,941 Super User 2025 Season 1
I'm still trying to work through 'Patch Multiple Galleries' issue.

I have Screen1, on which is PS_Gallery (the main gallery).

Within PS_Gallery are label and text inputs, as well has three nested/embedded galleries -
PS_Tap_Gallery
PS_Flux_Gallery
PS_SOW_Gallery

I've working up a formula that is creating a single line in a Collection called
colProductionUploadData.

Issues:
1. Not all gallery items are posting to collection. Only PS_Gallery and PS_Tap_Gallery content
is posting.

2. No data from PS_Flux_Gallery or PS_SOW_Gallery is posting to the collection.

3. Where there are multiple items in the PS_Tap_Gallery, only the last item is posting to the
collection.

Preferred Outcome:
1. Post all gallery items to collection/SP list.

2. Where there are multiple line items in PS_Flux_Gallery, PS_Tap_Gallery or PS_SOW_Gallery
there should be a line item for each with the PS_Gallery data also populating those line items.

Power App screen. All fields and labels at the top of part of PS_Gallery, followed by PS_Flux_Gallery,
PS_Tap_Gallery or PS_SOW_Gallery.


Submit Button formula -
ClearCollect(colProductionUploadData,
    ForAll(PS_Gallery.AllItems,
    //PS_Gallery fields
    {col_HeatDate: PS_Date_Fld.Text,
     col_HeatNumber: PS_Heat_Number_Fld.Text,
     col_FunaceNumber: PS_Furnace_Number_Fld.Text,
     col_CampaignNumber: PS_Campaign_Number_Fld.Text,
     col_ReceiverNumber: "",
     col_TagNumber: PS_Tag_Number_Fld.Text,
     col_Supplier: PS_Supplier_Name_Fld.Text,
     col_Commodity: PS_Commodity_Fld.Text,
     col_WeightIn: PS_Weight_In_Fld.Text,
     col_WeightOut: PS_Weight_Out_Fld.Text,
     col_SowCount: PS_SOW_Master_Count_Fld.Text,
     col_ST_Toll_BS: PS_ST_Toll_BS_Fld.Text,
     col_Manager: PS_Manager_Name_Fld.Text,
     col_Recovery: PS_Recovery_Fld.Text,
     col_Delivery_Number: PS_Delivery_Number_Fld.Text,
     col_Tag_Number: PS_Tag_Number_Fld.Text,
     col_SOW_Master: PS_SOW_Master_Count_Fld.Text,
 
  //PS_Flux Gallery fields
     col_FluxType: PSFG_Flux_Type_DD.Selected.Value,
     col_FluxWeight: PSFG_Flux_Weight_Fld.Text,
 
  //PS_Tap_Gallery fields  
     col_Tap_Number: PSTG_Tap_Number_DD.Selected.Value,
     col_Tap_Time: PSTG_Tap_Time_Fld.Text,
     col_Tap_SOW_Count: PSTG_SOW_Count_Fld.Text,
 
  //PS_SOW_Gallery fields  
     col_SOW_Tag_Number: PSSG_SOW_Tag_Fld.Text,
     col_SOW_Weight: PSSG_SOW_Weight_Fld.Text,
     col_SOW_1: PSSG_SOW_Number_DD.Selected.Value
   
    }
));
  • Verified answer
    Phineas Profile Picture
    4,941 Super User 2025 Season 1 on at
    Patch Multiple Galleries to SharePoint List
    This seems to have done it.

    Six lines of input. All base data on each line with each gallery item reflected.

    THANK YOU ALL FOR YOUR PATIENCE.
     
        ForAll(
        PS_Tap_Gallery.AllItems,    
        Patch(
            Production_Dataset_List,
            Defaults(Production_Dataset_List),
            {
            Tap_Number: PSTG_Tap_Number_DD.Selected.Value,
            Tap_Time: PSTG_Tap_Time_Fld.Text,
            Tap_SOW_Count: PSTG_SOW_Count_Fld.Text,    
            Heat_Date: DateValue(PS_Date_Fld.Text),
            Title: PS_Heat_Number_Fld.Text,
            Production_Add_Time: PS_Start_Time_Fld.Text,
            Supervisor_Name: PS_Manager_Name_Fld.Text,
            ST_TOLL_BS: PS_ST_Toll_BS_Fld.Text,
            Delivery_Number: PS_Delivery_Number_Fld.Text,
            Campaign: PS_Campaign_Number_Fld.Text,
            Tag_Number: PS_Tag_Number_Fld.Text,
            Furnace: PS_Furnace_Number_Fld.Text,
            Expected_Recovery: PS_Expected_Recovery_Fld.Text,
            Supplier: PS_Supplier_Name_Fld.Text,
            Commodity: PS_Commodity_Fld.Text,
            Weight_In: PS_Weight_In_Fld.Text,
            Weight_Out: PS_Weight_Out_Fld.Text,
            Recovery: PS_Recovery_Fld.Text,
            Sow_Master: PS_SOW_Master_Count_Fld.Text
            }
        ));
        ForAll(
        PS_SOW_Gallery.AllItems,    
        Patch(
            Production_Dataset_List,
            Defaults(Production_Dataset_List),
            {
            Sow_1: PSSG_SOW_Number_DD.Selected.Value,
            SOW_Tag_Number: PSSG_SOW_Tag_Fld.Text,
            SOW_Weight: PSSG_SOW_Weight_Fld.Text,  
            Heat_Date: DateValue(PS_Date_Fld.Text),
            Title: PS_Heat_Number_Fld.Text,
            Production_Add_Time: PS_Start_Time_Fld.Text,
            Supervisor_Name: PS_Manager_Name_Fld.Text,
            ST_TOLL_BS: PS_ST_Toll_BS_Fld.Text,
            Delivery_Number: PS_Delivery_Number_Fld.Text,
            Campaign: PS_Campaign_Number_Fld.Text,
            Tag_Number: PS_Tag_Number_Fld.Text,
            Furnace: PS_Furnace_Number_Fld.Text,
            Expected_Recovery: PS_Expected_Recovery_Fld.Text,
            Supplier: PS_Supplier_Name_Fld.Text,
            Commodity: PS_Commodity_Fld.Text,
            Weight_In: PS_Weight_In_Fld.Text,
            Weight_Out: PS_Weight_Out_Fld.Text,
            Recovery: PS_Recovery_Fld.Text,
            Sow_Master: PS_SOW_Master_Count_Fld.Text
            }
        ));
        ForAll(
        PS_Flux_Gallery.AllItems,    
        Patch(
            Production_Dataset_List,
            Defaults(Production_Dataset_List),
            {
            Flux_Type: PSFG_Flux_Type_DD.Selected.Value,
            Flux_Weight: Value(PSFG_Flux_Weight_Fld.Text),        
            Heat_Date: DateValue(PS_Date_Fld.Text),
            Title: PS_Heat_Number_Fld.Text,
            Production_Add_Time: PS_Start_Time_Fld.Text,
            Supervisor_Name: PS_Manager_Name_Fld.Text,
            ST_TOLL_BS: PS_ST_Toll_BS_Fld.Text,
            Delivery_Number: PS_Delivery_Number_Fld.Text,
            Campaign: PS_Campaign_Number_Fld.Text,
            Tag_Number: PS_Tag_Number_Fld.Text,
            Furnace: PS_Furnace_Number_Fld.Text,
            Expected_Recovery: PS_Expected_Recovery_Fld.Text,
            Supplier: PS_Supplier_Name_Fld.Text,
            Commodity: PS_Commodity_Fld.Text,
            Weight_In: PS_Weight_In_Fld.Text,
            Weight_Out: PS_Weight_Out_Fld.Text,
            Recovery: PS_Recovery_Fld.Text,
            Sow_Master: PS_SOW_Master_Count_Fld.Text
            }
        )            
    )
     
  • Phineas Profile Picture
    4,941 Super User 2025 Season 1 on at
    Patch Multiple Galleries to SharePoint List
    @WarrenBelz

    I was trying to free you from this burden. :-)
  • WarrenBelz Profile Picture
    147,809 Most Valuable Professional on at
    Patch Multiple Galleries to SharePoint List
    You already have a long thread with three people helping you on this issue - this one is only starting the process again.
  • Suggested answer
    MooseBot88 Profile Picture
    167 on at
    Patch Multiple Galleries to SharePoint List
    What's your Datasource structure?
     
    Do you have 4 tables for each Gallery setup because you could Patch the first PS_Gallery first and then do a ForAll for each sub gallery but patching to each table in your Datasource?
     
    Then use the ID field for example in the main PS_Gallery as a reference to link them all together.
     
    --------------------------------------------------------------------------------
    If this helps, let me know. If you want to buymeacoffee.com/moosebot88

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >