cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abrae005
Kudo Collector
Kudo Collector

Form Dropdown not filling properly for new form

I'm building an app, tied to a SharePoint List ('Dashboard'), with a form (frm_Edit). One of the fields is "Impacted System". I have a 2nd SP list, called "Systems", which only has 1 field - Title.

 

On frm_Edit, I'd like the Impacted System field to be a dropdown, populated with the items in 'Systems'. It will then save to the "Impacted System" field in my 'Dashboard' SP list. I've got the Items property of the dropdown set to 'Systems', and it is populating correctly.

 

The app has 3 screens - scrn_Home, scrn_Gallery, and scrn_Edit. scrn_Home has buttons that will take you to the Gallery, or an "Add New" button that will take you directly to scrn_Edit.

 

If a user goes to the gallery, and then clicks on an item, it'll take you to scrn_Edit, and the dropdown will be correctly filled. However, if you start at scrn_Home, and click the "New" button, it'll still take you to the form, and you can fill it out, and it saves correctly, but then the dropdown shows the last item selected in the gallery, rather than whatever you just selected.

 

I'm sure the issue is with the dropdown's "Default" property, but I'm not sure what it needs to be. This is what I currently have:

If(_PrevScreen2 = scrn_Gallery, gallery_Details.Selected.'Impacted System')

 

_PrevScreen2 is a variable that is set when navigating between screens. 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @abrae005 ,

Firstly your Items

If(
   _PrevScreen2 = scrn_Gallery, 
   gallery_Details.Selected.'Impacted System'
)

has to show the last item selected in the gallery (that is what it is set at). You cannot programmatically "select" an item from the gallery. Assuming that the "alternative" on the Variable _PrevScreen2 is a new record, you need something like this

If(
   _PrevScreen2 = scrn_Gallery, 
   gallery_Details.Selected.'Impacted System',
   YourNewFormName.LastSubmit.'Impacted System'
)

 

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.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @abrae005 ,

Firstly your Items

If(
   _PrevScreen2 = scrn_Gallery, 
   gallery_Details.Selected.'Impacted System'
)

has to show the last item selected in the gallery (that is what it is set at). You cannot programmatically "select" an item from the gallery. Assuming that the "alternative" on the Variable _PrevScreen2 is a new record, you need something like this

If(
   _PrevScreen2 = scrn_Gallery, 
   gallery_Details.Selected.'Impacted System',
   YourNewFormName.LastSubmit.'Impacted System'
)

 

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.

View solution in original post

Thank you @WarrenBelz . That worked.

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,986)