Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Updating gallery all items data into sql having an issue in powerapps

(0) ShareShare
ReportReport
Posted on by

Hello there,


I have two galleries on one screen where I have been facing an issue with updating those gallery data into SQL.

 

Issue:

The First Gallery data update perfectly into SQL but the 2nd gallery data update becomes blank when I try to update again then it's going to update perfectly.

The code is like below:

ForAll(
Gallery4_1.AllItems,
Patch(
,
{ID:Value(lblAPIS_ID.Text)},
{
api_Regulatory_Status:txtinputgallery4_1.Text
}
));

ForAll(
GalleryAPIB_1.AllItems,
Patch(
Datatable,
{ID:Value(lblgalleryapi.Text)},
{
column :txtinputgalleryapib_1.Text
}
)
);

Please let me now the issue as well as the solution.

Regards,

Manoj Roy

  • cha_cha Profile Picture
    4,909 Super User 2025 Season 1 on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    Glad you got it sorted. Please mark your response as the answer to close this topic and also for people to know what you did to got it sorted.

  • Verified answer
    manojrohit16 Profile Picture
    on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    Thank you for your kind response and help to solve this issue.

     

    I solved it yesterday by creating a collection and pulling the data from that collection to update it in SQL.

     

    Regards,

    Manoj Roy

  • cha_cha Profile Picture
    4,909 Super User 2025 Season 1 on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    Hello @manojrohit16 

     

    Please check this video that I made, a similar case as yours. Please follow so you can copy your data from the gallery to SQL.

     

    The video:

    https://youtu.be/LNz5FwBmWD0

     

  • manojrohit16 Profile Picture
    on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    I want to achieve result like below:

    ID    Gallery1.col    Gallery2.col

    1     Gallery1           Gallery2

    2     Gallery1           Gallery2

  • cha_cha Profile Picture
    4,909 Super User 2025 Season 1 on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    Can you please screenshot and annotate the thing that you want to achieve?

  • manojrohit16 Profile Picture
    on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    No, facing the same issue.

  • cha_cha Profile Picture
    4,909 Super User 2025 Season 1 on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    It worked? 

     


      ✔️
    Just in case my response helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

     

      🔗
    🕸bistek.space  🐦 @cha_bistek  📺 @BisTekSpace 
  • manojrohit16 Profile Picture
    on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    Yes, you are right.

  • cha_cha Profile Picture
    4,909 Super User 2025 Season 1 on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    Hello @manojrohit16 

     

    Your code should be something like this:

     

    ForAll(
    	Gallery4_1.AllItems,
    		Patch(
    			SqlDB,
    			LookUp(SqlDB, ID=Value(lblAPIS.Text)),
    			{
    				api_Regulatory_Status:txtinputgallery4_1.Text
    			}
    	)
    );
    
    ForAll(
    	GalleryAPIB_1.AllItems,
    		Patch(
    			SqlDB,
    			LookUp(SqlDB, ID=Value(lblgalleryapi.Text)),
    			{
    				column :txtinputgalleryapib_1.Text
    			}
    	)
    );
  • manojrohit16 Profile Picture
    on at
    Re: Updating gallery all items data into sql having an issue in powerapps

    ForAll(
    Gallery4_1.AllItems,
    Patch(

    SqlDB,
    {ID:Value(lblAPIS_ID.Text)},
    {
    api_Regulatory_Status:txtinputgallery4_1.Text
    }
    ));

    ForAll(
    GalleryAPIB_1.AllItems,
    Patch(
    SqlDB,
    {ID:Value(lblgalleryapi.Text)},
    {
    column :txtinputgalleryapib_1.Text
    }
    )
    );

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,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard