Announcements
The Form mode should change if the ID exists ? The below formula is not working. Please advise.
@Sajith ,
Assuming you are selecting the form from a gallery - the test would be
If( GalleryName.Selected.IncidentID=0, FormMode.New, FormMode.Edit )
However I suspect you are not selecting form a gallery. Also the conundrum you have is that a new form has no data, therefore no IncidentID (so it will never be 0 and you have a potential circular reference)
What exactly are you doing when navigating to this form and what is the logic of the test?
Yes, I am not selecting from a gallery. I am navigating from screen1 to Screen2 and capturing Incident ID in Screen2. When I am in Screen2, Incident ID may or may not be there. If it is there, New Form otherwise Edit Form.
Item property of Form as follows.
LookUp('Incident Resolution',IncidentID=vGlobalID)
Hi @Sajith ,
What I posted originally would probably work, but better on the OnSelect of the Gallery
If( ThisItem.IncidentID=0, NewForm(YourFormName), EditForm(YourFormName) ); Navigate(YourScreenName)
then the DefaultMode of the Form can be whatever you want (View/Edit/New).
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.
Thanks for help. I am using a button instead of gallery. Your approach guided me.
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 432 Super User 2026 Season 2
Mohsin Ali 347
WarrenBelz 254 Most Valuable Professional