Hi,
I am having trouble with a formula. I will explain what I am trying to do:
1) I have a Text column, (DatacardValue7), that I would like to search the SharePoint List for duplicates when a user is entering the data, before Submit/Save, to see if it finds a duplicate value. So the user doesn't waste their time entering a lot of data only to have the system not save, since the Title Column will not save a duplicate, only unique values.
2. I have a Label,(Label9) where I would like it to Display "Duplicate Found" in RED, or be blank if no duplicate found after the search for duplicates is done on the Text column.
3. My form is 'GOS Daily Log V24'
4. I would like this to be done on New form only, as we edit the form and I do not want to have the Label (label9) visible pr perform a check for duplicates on the Text column(DatacardValue7) in Edit, since it will undoubtedly return a Duplicate.
Help on this formula will be greatly appreciated!
Ren
HI @ren0927 ,
Probably something like this
If(
YourFormName.Mode = FormMode.New &&
!IsBlank(
LookUp(
SPList,
YourTextField = DataCardValue7.Text
).YourTextField,
Notify(
"Duplicate found",
NotificationType.Error
),
SubmitForm('GOS Daily Log V24')
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Thanks for the reply, unfortunately ,
YourFormName.Mode = FormMode.New, DoWhatever
it is the DoWhatever part that I am struggling with.
Ren
Hi @ren0927 ,
Test for the Form Mode
If(
YourFormName.Mode = FormMode.New,
DoWhatever
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps