cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ha_wai
Helper III
Helper III

No item do display - how do I get the Item property right

Hi everybody,

 

this seems to be a rehash of many similar questions. Unfortunately I seem to be too thick to understand previous answers.

 

Simple situation: two screens, one with a gallery the other with a form. In the gallery a record in a sharepoint list gets selected in the second some aspects of this record shall be edited.

 

screenshot2.png

 

screenshot3.jpg

 

What did I do wrong this time? Is there some place on the web with a comprehensive explanation/summary of the ThisItem, Parent, etc. thing explained so that somebody without years of MS lingo experience can understand it (searched long and hard but failed)?

 

TIA for the help and time

Hansjoerg

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @ha_wai ,

 

Please try below OnSelect of the arrow within the Gallery ActiveFlights:

Set(cvar_current, ThisItem);
Navigate(TimeScreen)

 

According to my test, the use of Navigate function to create record type context variables is not supported.

vjefferni_0-1632886236271.png

 

Since you will need to use the variable as the item of a form, it is a record. Please try and set a global variable instead.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

7 REPLIES 7
rsaikrishna
Community Champion
Community Champion

@ha_wai 

 

In the first screen, update the Navigate function as below:

Navigate( TimeScreen,None, { varSelectedItem: ActiveFlights.Selected } )

 

In your second screen, place below formula in the Items property:

varSelectedItem

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

ha_wai
Helper III
Helper III

P.S. when I try it in the editor it works but in the play preview it comes up empty...

rsaikrishna
Community Champion
Community Champion

@ha_wai 

 

With Navigate function in the first screen, we are sending a variable value. In hope, your preview, you are navigating from 1st screen to 2nd one. 

 

Also, please make sure ActiveFlights.Selected is sending the list item from the same data source ie., the items in the gallery (1st screen) and form in the 2nd screen are referring to same data source.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

 

This didn't really help.

 

This is what i tried in the OnSelect of the arrow: Navigate(TimeScreen,None, { cvar_current: ActiveFlights.Selected})

This is what i tried in the Item property of the Edit Form: cva_current

This is what I got:

screenshot5.png

 

screenshot6.png

 

I'm honestly quite lost here.

 

TIA again for everybody's time and help!
Hansjoerg

v-jefferni
Community Support
Community Support

Hi @ha_wai ,

 

Please try below OnSelect of the arrow within the Gallery ActiveFlights:

Set(cvar_current, ThisItem);
Navigate(TimeScreen)

 

According to my test, the use of Navigate function to create record type context variables is not supported.

vjefferni_0-1632886236271.png

 

Since you will need to use the variable as the item of a form, it is a record. Please try and set a global variable instead.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @v-jefferni,

 

to my big surprise this worked.

 

I also trialled a second approach using the automatic generation of an app based on the list. This auto generated app just used the documented approach. On the first screen of that there is a gallery and on the details and edit screen the Item property of the form is set to "BrowseGallery.selected".

 

Any idea why this works on the auto generated app but not on the one built from scratch? Are there any global settings for an app that would prevent this approach from working? I'm quite happy that there are finally two working solution to my problem, but I would really like to understand what causes the different behaviour.

 

Cheers

Hansjoerg

v-jefferni
Community Support
Community Support

Hi @ha_wai ,

 

Gallery.Selected will always be working for simple Apps that contain not many Forms. On your side you are storing the item selected from gallery into a variable, this approach could help you use this selected record repeatedly or use in multiple screens, so I would recommend you to use Set function to create global variables other than creating context variables using UpdateContext or Navigate functions. However, if you would like to simply use a selected record as item of a single form, Gallery.Selected is quite enough, but Select(Parent) is necessary OnSelect of the navigate button of the Gallery at first, like in the App you have just created from the data source.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,861)