Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • jneuen Profile Picture
    55 on at
    Re: Patch Help

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

  • mmbr1606 Profile Picture
    12,857 Super User 2025 Season 1 on at
    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 at
    Re: Patch Help

    Still just brining in the completed 

  • Verified answer
    mmbr1606 Profile Picture
    12,857 Super User 2025 Season 1 on at
    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 at
    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
    12,857 Super User 2025 Season 1 on at
    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 770 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 494

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 399