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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Updating gallery all i...
Power Apps
Unanswered

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard