cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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

Highlighted

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
Highlighted
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

Highlighted
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

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,065)