cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kpreeti1256
Helper II
Helper II

" No Data to Display" in edit form

blankform.JPG

 

Hi,

 

I am trying to create a Edit form for the users to Subscribe in an event. The form looks fine when it is in Edit mode, but when I play the app, the form disappers and I get a text "No Data to Display". Please help.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Kpreeti1256 

 

I am guessing that this is happening because the form state is not defined? Do you want to create a New Form or edit Existing record?
You can set the expression on "OnVisible" property of the screen as: NewForm(Form1)
Here, Form1 is the name of my Edit Form.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Hi @Kpreeti1256 

 

For that, you need to update the "Item" property of the form as:
 
Last(DataSourceName)
 
Here, please update the DataSourceName with the actual name of your datasource.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

5 REPLIES 5
yashag2255
Dual Super User II
Dual Super User II

Hi @Kpreeti1256 

 

I am guessing that this is happening because the form state is not defined? Do you want to create a New Form or edit Existing record?
You can set the expression on "OnVisible" property of the screen as: NewForm(Form1)
Here, Form1 is the name of my Edit Form.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

v-yutliu-msft
Community Support
Community Support

Hi @Kpreeti1256 ,

This problem is mainly about form's mode.

Now let me explain about it.

1)Edit form's default mode is Edit.

2)If you set the form's mode to New, then you do not need to set the form's Item.

 The form will be used to add new record. (every field's value display empty value)

3)If you set the form's mode to Edit, then you need to set the form's Item to one spefic Item.

The form will be used to edit an existing record. Set the form's Item to the record that you want to edit , for example: Gallery1.Selected.

4) If you submit the form, the form's Mode will change back to its default value: Edit.

 

 

The reason why the form display "No Item to display " may be these two reasons:

1)You want to add new record, but you do not set the form's DisplayMode to New.

2)You submit the form, the form's mode change back to edit and you do not set the form's Item.

To sum up, when your form's Mode is Edit and you do not set the form's Item, "No Item to display" will show.

 

Please modify your form based on your situation.

If you want to create new record, please set the form's DisplayMode to New and set the submit button's OnSelect:

Submit(Form1);NewForm(Form1)    //keep the form's mode being new

If you want to edit an existing record, please set the form's Item.

Here's a doc about it for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-form-detail

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the replies @yashag2255  and @v-yutliu-msft !

I have a question though, I have created two buttons to create New/Edit forms. Now, I don't have a gallery but I just want to edit the last record in the list. This data source collects one record daily and I only want to give user the flexibility to edit last record. How should I refer my form to point to the last record if it is in Edit Mode?

I really appreciate all the help!

Hi @Kpreeti1256 

 

For that, you need to update the "Item" property of the form as:
 
Last(DataSourceName)
 
Here, please update the DataSourceName with the actual name of your datasource.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Hi @yashag2255 

I've four screens BrowseScreen, DetailScreen, Form1(EditScreen), Form2.

Basically when I update any content from Form1 using 

If(DataSourceInfo([@datasource],EditPermission), Edit, Disabled)

gets updated but when I include contents from Form2 and hit submit it generates a new record with same data.

Is it possible to update a record in forms split in more than one screen?

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (53,806)