Hello,
I have a form which is a sharepoint combo box.
It allows to pick people.
Items: Choices([@ListaAdmin].Dane_x0020_administratora)
It works good - I can pick people from my AD.
But I want to use this form together with a button that submit it.
It works in a basic mode.
SubmitForm(Form6);ResetForm(Form6);Notify("Admin added!",NotificationType.Success)
but it allows people to submit admin name more than once. It causes duplicates.
So I thought that I can use such a function:
If(
!IsBlank(LookUp('ListaAdmin', Choices([@ListaAdmin].Dane_x0020_administratora).DisplayName),
Notify("This user is already admin", NotificationType.Error),
SubmitForm(Form6);ResetForm(Form6)
))
I want this to check through ListaAdmin (sharepoint list) whether user is already added. If yes - stop the action with error.
Perfectly it would also show message onSuccess...
But this shows errors:
Invalid argument table, expected a boolean, Invalid number of arguments received 3 , expected 1, invalid number of arguments expected 2 or more and received 1, lookup function got invalid arguments.
Thanks for help and tips.
Edit.
I also tried this:
If(
!IsBlank(LookUp('ListaAdmin',Choices([@ListaAdmin].Dane_x0020_administratora) in DataCardValue5.SelectedItems.Value),
Notify("This user is already admin", NotificationType.Error),
SubmitForm(Form6);ResetForm(Form6)
))
but still no results...