Hi @Ashok2,
Have you solved your problem?
Do you want to validate the UID and people picker choice?
Could you please share a bit more about your scenario?
Actually, I think there is something argument invalid happened to your formula.
The second If() statement will display a banner message if the condition is true, but it returns a record if the condition is false. Did you notice that the data types of the two arguments are completely different.
In addition, if you have something validation with your form, what makes no sense is that you use the !Form2.Valid to submit form. This is totally contradictory.
If you insist on validate both UID and people picker choice, I suggest you consider the Error Message text input within the data card.
Set the Text property of the Error Message text input as below:
"Email already exists in table!"
Set the Visible property of the Error Message text input as below:
If(
!(IsEmpty(DataCardValue25.Selected.Email) || IsBlank(DataCardValue25.Selected.Email)),
CountRows(
Filter(
Product,
DataCardValue25.Selected.Email in Employee.Email
)
) > 0,
false
)
So as the Text property of the Error Message text input corresponding to the UID as below:
"UID already exists in table"
So as the Visible property of the Error Message text input corresponding to the UID as below:
If(
!IsBlank(
LookUp(
Product,
Title = DataCardValue26.Text
)
),true,false)
Then Set the OnSelect property of the submit button as below:
If(
ErrorMessage27.Visible || ErrorMessage23.Visible,
Notify(
"UID or Email exists, please note the error message!",
NotificationType.Warning
),
SubmitForm(EditForm1)
)
Check if this could help you at some degree.