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 Apps
Answered

Patch Help

(0) ShareShare
ReportReport
Posted on by 55

Hi, I'm writing a patch that looks at two checkboxes, if one then it patches completed, if the other marks for pending corrections in a gallery. For some reason the patch is only picking up the completed if I select multiple. If I just selected no, it will pick up pending corrections. I've tried moving them around or nesting them in an IF statement, but it still only picks up one type

jneuen_0-1712064901562.png

jneuen_1-1712064919953.png

jneuen_2-1712064940650.png

 

 

 

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @jneuen 

     

    can you please copy/paste your code here so we do not need to retype.

     

    thanks in advance

     

  • jneuen Profile Picture
    55 on at

    ForAll(
    Filter(
    Gallery2.AllItems,
    Checkbox1.Value
    ),
    Patch(
    Address_Validation_Reports_To_Corrections,
    {
    POI: Body2_1.Text,
    'Duty Location': Subtitle2_15.Text,
    'Duty Station': Subtitle2_2.Text,
    Attested: If(
    Checkbox1.Value,
    "Completed"
    ),
    Description: Body2_13.Text,
    'Employee Name': Subtitle2_3.Text,
    ReportsTo_Email: Subtitle2_4.Text,
    date_person_submitted_comment: Now() & " - " & varUser.FullName,
    telework_type: {Value: ComboBox2.Selected.Value},
    comment: TextInput2.Text,
    main_list_ID: Label8.Text
    }
    )
    );
    ForAll(
    Filter(
    Gallery2.AllItems,
    Checkbox1.Value
    ),
    Patch(
    Address_Validation_Reports_To,
    ThisRecord,
    {Status: "Completed"}
    )
    );
    ForAll(
    Filter(
    Gallery2.AllItems,
    Checkbox1_2.Value
    ),
    Patch(
    Address_Validation_Reports_To_Corrections,
    {
    POI: Body2_1.Text,
    'Duty Location': Subtitle2_15.Text,
    'Duty Station': Subtitle2_2.Text,
    Attested: If(
    Checkbox1_2.Value,
    "Correction Required"
    ),
    Description: Body2_13.Text,
    'Employee Name': Subtitle2_3.Text,
    ReportsTo_Email: Subtitle2_4.Text,
    date_person_submitted_comment: Now() & " - " & varUser.FullName,
    telework_type: {Value: ComboBox2.Selected.Value},
    comment: TextInput2.Text,
    main_list_ID: Label8.Text
    }
    )
    );
    ForAll(
    Filter(
    Gallery2.AllItems,
    Checkbox1_2.Value
    ),
    Patch(
    Address_Validation_Reports_To,
    ThisRecord,
    {Status: "Pending MSS"}

    )
    )
    ;
    Notify(
    "Review Complete",
    NotificationType.Success,
    3000
    )

  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @jneuen 

     

    can you try this pls:

    ForAll(
     Filter(
     Gallery2.AllItems,
     Checkbox1.Value
     ),
     Patch(
     Address_Validation_Reports_To_Corrections,
     {
     POI: Body2_1.Text,
     'Duty Location': Subtitle2_15.Text,
     'Duty Station': Subtitle2_2.Text,
     Attested: "Completed",
     Description: Body2_13.Text,
     'Employee Name': Subtitle2_3.Text,
     ReportsTo_Email: Subtitle2_4.Text,
     date_person_submitted_comment: Now() & " - " & varUser.FullName,
     telework_type: {Value: ComboBox2.Selected.Value},
     comment: TextInput2.Text,
     main_list_ID: Label8.Text
     }
     );
     Patch(
     Address_Validation_Reports_To,
     ThisRecord,
     {Status: "Completed"}
     )
    );
    
    ForAll(
     Filter(
     Gallery2.AllItems,
     Checkbox1_2.Value
     ),
     Patch(
     Address_Validation_Reports_To_Corrections,
     {
     POI: Body2_1.Text,
     'Duty Location': Subtitle2_15.Text,
     'Duty Station': Subtitle2_2.Text,
     Attested: "Correction Required",
     Description: Body2_13.Text,
     'Employee Name': Subtitle2_3.Text,
     ReportsTo_Email: Subtitle2_4.Text,
     date_person_submitted_comment: Now() & " - " & varUser.FullName,
     telework_type: {Value: ComboBox2.Selected.Value},
     comment: TextInput2.Text,
     main_list_ID: Label8.Text
     }
     );
     Patch(
     Address_Validation_Reports_To,
     ThisRecord,
     {Status: "Pending MSS"}
     )
    );
    
    Notify(
     "Review Complete",
     NotificationType.Success,
     3000
    )
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • jneuen Profile Picture
    55 on at

    Still just brining in the completed 

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    can u try this modification:

    ForAll(
     Gallery2.AllItems,
     If(
     Checkbox1.Value,
     Patch(
     Address_Validation_Reports_To_Corrections,
     {
     POI: Body2_1.Text,
     'Duty Location': Subtitle2_15.Text,
     'Duty Station': Subtitle2_2.Text,
     Attested: "Completed",
     Description: Body2_13.Text,
     'Employee Name': Subtitle2_3.Text,
     ReportsTo_Email: Subtitle2_4.Text,
     date_person_submitted_comment: Now() & " - " & varUser.FullName,
     telework_type: {Value: ComboBox2.Selected.Value},
     comment: TextInput2.Text,
     main_list_ID: Label8.Text
     }
     );
     Patch(
     Address_Validation_Reports_To,
     ThisRecord,
     {Status: "Completed"}
     )
     );
    
     If(
     Checkbox1_2.Value,
     Patch(
     Address_Validation_Reports_To_Corrections,
     {
     POI: Body2_1.Text,
     'Duty Location': Subtitle2_15.Text,
     'Duty Station': Subtitle2_2.Text,
     Attested: "Correction Required",
     Description: Body2_13.Text,
     'Employee Name': Subtitle2_3.Text,
     ReportsTo_Email: Subtitle2_4.Text,
     date_person_submitted_comment: Now() & " - " & varUser.FullName,
     telework_type: {Value: ComboBox2.Selected.Value},
     comment: TextInput2.Text,
     main_list_ID: Label8.Text
     }
     );
     Patch(
     Address_Validation_Reports_To,
     ThisRecord,
     {Status: "Pending MSS"}
     )
     )
    );
    
    Notify(
     "Review Complete",
     NotificationType.Success,
     3000
    )
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • jneuen Profile Picture
    55 on at

    Thank you so much!!! It worked like a charm

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 476

#2
WarrenBelz Profile Picture

WarrenBelz 365 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 339

Last 30 days Overall leaderboard