Hi @Anonymous ,
Could you please share more details about the formula you typed within the Items property of the Requestor Dropdown box and Approver Dropdown box?
Do you want to compare the selected value within the two Dropdown box?
Which type column in your data source do the two Dropdown box connect to? Person type column in your SP List?
Based on the formula you provided, I think there is something wrong with it. Please consider modify your formula as below:
Set the DisplayMode property of the "Save" button to following:
If(
RequestorDropdown.Selected.Value = ApproverDropdown.Selected.Value,
DisplayMode.Disabled,
DisplayMode.Edit
)
If the two Dropdown boxes or ComboBox (Requestor & Approver) connects to Person type column in a SP List, please consider modify above formula as below:
Set the DisplayMode property of the "Save" button to following:
If(
RequestorDropdown.Selected.DisplayName = ApproverDropdown.Selected.DisplayName,
DisplayMode.Disabled,
DisplayMode.Edit
)
Note: I assume that the Items proeprty of Requestor ComboBox and Approver ComboBox has been set to following individually:
Choices('YourSPList'.Requestor)
Choices('YourSPList'.Approver)
Please consider take a try with above solution, then check if the issue is solved.
If the Items property of the Requestor ComboBox and Approver ComboBox has been set to following formula:
Distinct(...)
Please modify above formula as below:
Set the DisplayMode property of the "Save" button to following:
If(
RequestorDropdown.Selected.Result = ApproverDropdown.Selected.Result,
DisplayMode.Disabled,
DisplayMode.Edit
)
If you want an error message to show up rather than disable the "Save" button, I think a Timer control could achieve your needs. Please add a Timer control in your Edit screen, set the Duration property to following:
1000
set the Repeat property and AutoStart property to following:
true
set the OnTimerEnd property to following:
If(
RequestorDropdown.Selected.DisplayName = ApproverDropdown.Selected.DisplayName,
Notify("The Requestor you selected could not be same as the Approver, please modify it!", NotificationType.Error)
)
Best regards,