cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
manojrohit16
Helper II
Helper II

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

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

13 REPLIES 13
cha_cha
Super User
Super User

Hello @manojrohit16 

 

Is this right?

 

cha_cha_0-1670846342437.png

 


 
Just in case you my answer 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   @charv3n    @BisTekSpace 
manojrohit16
Helper II
Helper II

Yes it is.

cha_cha
Super User
Super User

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

cha_cha_0-1670846814964.png

 


 
Just in case you my answer 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   @charv3n    @BisTekSpace 

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
Super User
Super User

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

 
Just in case you my answer 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   @charv3n    @BisTekSpace 

Yes, you are right.

cha_cha
Super User
Super User

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 

 
Just in case you my answer 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   @charv3n    @BisTekSpace 

No, facing the same issue.

cha_cha
Super User
Super User

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


 
Just in case you my answer 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   @charv3n    @BisTekSpace 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,614)