web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to display either ...
Power Apps
Unanswered

How to display either a new form or edit form depending on if a record exists or not.

(0) ShareShare
ReportReport
Posted on by 13

I'm really new to Power Apps and looking for advice. 

 

I'd like my app to start/navigate directly to a form in either edit or new mode, depending on if the users().email exists in the datasource (SP list). The contents of Item is set to display under the following condition:

 

LookUp(
'Phone Number Assignments',
'Employee Email Address'.Email = varUser
)

 

varUser is set as User().Email in the OnStart of the app

 

Currently, if Lookup is returned blank, the form simply says 'No item to display'. When the Lookup is not blank, it displays the Form. I have tried changing the FormMode to Edit or New depending, but not having any success. I'm not sure where is best to include the code to accomplish this. HOw do you go about doing this?

 

 

Categories:
  • jefmeyer Profile Picture
    166 on at

    Assuming this is a Canvas App, in the App.StartScreen you could do something like the following:

    If(IsBlank(LookUp('Phone Number Assignments','Employee Email Address'.Email = varUser)),Screen1,Screen2)

  • jefmeyer Profile Picture
    166 on at

    Sorry, you said display mode not screen.  You can do something like the following in the Form.DefaultMode


    If(IsBlank(LookUp('Phone Number Assignments','Employee Email Address'.Email = varUser)),FormMode.Edit,FormMode.View)

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard