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

Community site session details

Session Id : ft3TKki9cR+QzQNAYTmxvR
Power Apps - Building Power Apps
Answered

Patch Help

Like (0) ShareShare
ReportReport
Posted on 2 Apr 2024 13:36:30 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:
  • jneuen Profile Picture
    55 on 02 Apr 2024 at 14:15:02
    Re: Patch Help

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

  • mmbr1606 Profile Picture
    13,494 Super User 2025 Season 2 on 02 Apr 2024 at 14:09:27
    Re: Patch Help

    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 02 Apr 2024 at 14:03:55
    Re: Patch Help

    Still just brining in the completed 

  • Verified answer
    mmbr1606 Profile Picture
    13,494 Super User 2025 Season 2 on 02 Apr 2024 at 13:58:04
    Re: Patch Help

    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 02 Apr 2024 at 13:53:23
    Re: Patch Help

    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
    )

  • mmbr1606 Profile Picture
    13,494 Super User 2025 Season 2 on 02 Apr 2024 at 13:51:52
    Re: Patch Help

    hey @jneuen 

     

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

     

    thanks in advance

     

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete