cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TDB-Jim
Frequent Visitor

Make icon visible depending on existence of record

Hi 

I have an Editform that is used both to enter details for new records, and edit fields for existing records.

I need to have an icon that is visible only if a record has been created and saved - i.e. in edit 'mode' and not in create 'mode'.

Can anyone advise what the control would be to achieve this for the Visible property of the icon?

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Nogueira1306
Super User
Super User

Hey! So, 

write this on visible property of icon:

 

If( Form.ViewMode = Form.Edit; true; false)

 

If youa re editing, it will show hte icon

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

View solution in original post

6 REPLIES 6
Nogueira1306
Super User
Super User

Hey! So, 

write this on visible property of icon:

 

If( Form.ViewMode = Form.Edit; true; false)

 

If youa re editing, it will show hte icon

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Thanks for the info,

However this is always in edit mode. Either adding a new record (icon hidden) or editing a record that has previously been added (icon visible).

Ok. Check IF ALL fields are empty. If yes, the form is new

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

TDB-Jim
Frequent Visitor

Tried that, however once you start entering data into any of the fields the icon appears. Hence why I titled the question as existence of record - and not contents of a field. I don't want the icon to be visible on the edit form when creating a new record. Once the record has been created the icon needs to be visible. So, open edit form to create new record, icon hidden, enter data and write to excel. Open edit form to access the new record, icon visible. Hope that all makes sense.

TDB-Jim
Frequent Visitor

My mistake - sorry I'm new to Power Apps? Your first response would work, as Editform is used for the edit, and Newform for the addition of a new record. However I cannot get the control to work with the info in your first reply.

TDB-Jim
Frequent Visitor

Got it - If(EditForm1.Mode=FormMode.Edit,true,false)

 

Many thanks.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,584)