cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sahlex
Regular Visitor

Dropdown not displaying choices from dataverse

Hi all.

 

I'm building a powerapp for assortment planning and hit a problem with a dropdown in a Form component.

Based on a table in Dataverse, I added a column of type Choices, referencing a choice table which I added in powerapp GUI. 

 

This works fine so far when using the GUI for editing the data. 

 

Now for my powerapp, I show a dropdown on a screen with a form connected to the table from dataverse. The field shows all options from the choices and I'm able to select different options. After saving the data (by submitting the form) they show up as they should in dataverse. 

 

Now for the problem: If I now enter my screen with the form again, all fields are filled with the appropriate fields from the dataverse - except the combobox for the choices-column!

 

Form before submit:

Sahlex_2-1640776988787.png

 

 

Data in dataverse: 

Sahlex_1-1640776875019.png

 

Form when called again (all previously modified data is set up correctly, except the choice field):

Sahlex_4-1640777111822.png

 

Am I overlooking something??

 

Best regards,

Alexander

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sahlex
Regular Visitor

Solved the issue!

 

In my screen with the data table, I did not include the column with the Targeting Group (Zielgruppe). So when navigating to the edit screen the form's item was set to table.Selected. However, this did not contain the data of the column Zielgruppe.

 

Because I have a very broad table with over 100 columns, I cannot display them all on the data table screen. I did it differently like this:

 

EditForm(frmEditGeneral);;
Set(gblSelected; LookUp(Sortimente;Sortiment=tblBrowseSortiment.Selected.Sortiment));;
Navigate('Edit Detail Screen';ScreenTransition.None);;

where the Column 'Sortiment' is the GUID of the row. The Item of the form element is then set to gblSelected.

This does the trick!

 

Best regards,

Alexander 

View solution in original post

3 REPLIES 3
rampprakash
Super User
Super User

Hello @Sahlex,

 

Hope in DataVerse environment it is CHOICES field not CHOICE field. Because as per the screenshot I can see you are selecting Multiple values.

 

Make sure the Default items you are refering to the DataVerse Choice field.

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

Sahlex
Regular Visitor

Hi Ram Prakash,

 

The field in DataVerse is clearly CHOICES, which is intentional.

Sahlex_0-1640849360345.png

The field setup is auto-generated by powerapps when I add the field to the form so I expect it to work. The DefaultSelectedItems is referring to Parent.Default which itself is set to ThisItem.Zielgruppe.

ThisItem is initialized with a Selected (row) from a table.

 

Best regards,

Alexander

Sahlex
Regular Visitor

Solved the issue!

 

In my screen with the data table, I did not include the column with the Targeting Group (Zielgruppe). So when navigating to the edit screen the form's item was set to table.Selected. However, this did not contain the data of the column Zielgruppe.

 

Because I have a very broad table with over 100 columns, I cannot display them all on the data table screen. I did it differently like this:

 

EditForm(frmEditGeneral);;
Set(gblSelected; LookUp(Sortimente;Sortiment=tblBrowseSortiment.Selected.Sortiment));;
Navigate('Edit Detail Screen';ScreenTransition.None);;

where the Column 'Sortiment' is the GUID of the row. The Item of the form element is then set to gblSelected.

This does the trick!

 

Best regards,

Alexander 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (2,468)