cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

I want to submit all the filter galley only marked information using the submit button

ForAll(
Gallery1.AllItems,
Patch(
'[dbo].[PerferctOrder_EDI_PA]',
LookUp(
'[dbo].[PerferctOrder_EDI_PA]',
Exclude_Flag = Exclude_Flag
),
{
Exclude_Flag: Checkbox1.Value,
Created_by: User().Email,
Created_On: Today()
}
)
)

1)in the above code, I was submitting  Checkbox value, user mail id, and date....but it was updating only one records...
2) I want to submit all the same value for the selected filed

Thanks 
Raj

2 ACCEPTED SOLUTIONS

Accepted Solutions
Anonymous
Not applicable

Hi RezaDorrani,

It will update the only database sequence order. not based on the gallery filter data.
in the attached image only I will filter sales group =241 in the gallery it will filter 13 records while I'm pressing submit button it will update the only database first records 

 

View solution in original post

Hi @Anonymous ,

Do you want to modity multiple records?

Try to modify your formula like this:

ForAll(
Gallery1.AllItems,
Patch(
'[dbo].[PerferctOrder_EDI_PA]',
LookUp(
'[dbo].[PerferctOrder_EDI_PA]',
Exclude_Flag =Gallery1.AllItems[@Exclude_Flag]
),
{
Exclude_Flag: Checkbox1.Value,
Created_by: User().Email,
Created_On: Today()
}
)
)

Usually we use @ to avoid ambiguity.

Here's a doc about it for your reference:

https://powerapps.microsoft.com/en-us/blog/bulk-update-using-forall-and-patch/

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Dual Super User II
Dual Super User II

Hi @Anonymous 

 

ForAll(
RenameColumns(Filter(Gallery1.AllItems, Checkbox1.Value = true), "Exclude_Flag", "Exclude_Flag1"),
Patch(
'[dbo].[PerferctOrder_EDI_PA]',
LookUp(
'[dbo].[PerferctOrder_EDI_PA]',
Exclude_Flag = Exclude_Flag1
),
{
Exclude_Flag: true,
Created_by: User().Email,
Created_On: Today()
}
)
)

 

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

Hi RezaDorrani,

It will update the only database sequence order. not based on the gallery filter data.
in the attached image only I will filter sales group =241 in the gallery it will filter 13 records while I'm pressing submit button it will update the only database first records 

 

View solution in original post

Hi @Anonymous ,

Do you want to modity multiple records?

Try to modify your formula like this:

ForAll(
Gallery1.AllItems,
Patch(
'[dbo].[PerferctOrder_EDI_PA]',
LookUp(
'[dbo].[PerferctOrder_EDI_PA]',
Exclude_Flag =Gallery1.AllItems[@Exclude_Flag]
),
{
Exclude_Flag: Checkbox1.Value,
Created_by: User().Email,
Created_On: Today()
}
)
)

Usually we use @ to avoid ambiguity.

Here's a doc about it for your reference:

https://powerapps.microsoft.com/en-us/blog/bulk-update-using-forall-and-patch/

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,187)