Announcements
Hello,
I would like to avoid duplicate entries when submitting the form, but only when form is in new mode (edit and submit of existing item with same button is fine). Where should I write the FormMode.New statement?
button OnSelect:
If(IsBlank(LookUp('CAD worklist'; Title=DataCardValue1.Text));SubmitForm(edit_form);Notify("Change Nr. already exists";NotificationType.Error);;SetFocus(DataCardValue1))
Thank you very much
Try adding a second condition to your If() statement:
If(IsBlank(LookUp('CAD worklist'; Title=DataCardValue1.Text)) && edit_form.Mode = Formmode.New; SubmitForm(edit_form); Notify("Change Nr. already exists";NotificationType.Error);; SetFocus(DataCardValue1) )
Hope that helps,
Bryan
Hello, I tried to add the statement, but it is still blocking me to update current items.
Any idea how to correct the code please?
Thank you
You can configure additional options on the If() statement to handle these situations:
If( (IsBlank(LookUp('CAD worklist'; Title=DataCardValue1.Text)) && edit_form.Mode = Formmode.New) || edit_form.Mode = Formmode.Edit; SubmitForm(edit_form); Notify("Change Nr. already exists";NotificationType.Error);; SetFocus(DataCardValue1) )
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 409 Super User 2026 Season 2
Mohsin Ali 328
WarrenBelz 252 Most Valuable Professional