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
Thank you so much!!! It worked like a charm
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
Still just brining in the completed
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
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
)
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399