web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Updating gallery all i...
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

Categories:
I have the same question (0)
  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @manojrohit16 

     

    Is this right?

     

    cha_cha_0-1670846342437.png

     

  • manojrohit16 Profile Picture
    on at

    Yes it is.

  • cha_cha Profile Picture
    4,932 Moderator on at

    If the first one work, how about removing datatable in 2nd one?

    cha_cha_0-1670846814964.png

     

  • manojrohit16 Profile Picture
    on at

    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
    }
    )
    );

  • cha_cha Profile Picture
    4,932 Moderator on at

    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

    Yes, you are right.

  • cha_cha Profile Picture
    4,932 Moderator on at

    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

    No, facing the same issue.

  • cha_cha Profile Picture
    4,932 Moderator on at

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

  • manojrohit16 Profile Picture
    on at

    I want to achieve result like below:

    ID    Gallery1.col    Gallery2.col

    1     Gallery1           Gallery2

    2     Gallery1           Gallery2

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard