cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Roberto_el_Hajj
Super User
Super User

How to save user's selected items from a combo box field in a form into dataverse?

Hello everyone, 

I hope all is well,

 

What I seek is after the user chooses multiple options in a combo field (the options of the combo box are being retrieved from another table called "reasons", in other words, I created a lookup column in order to get the option), I want to submit the form and store data in a column called "Reason" in a table called "Time Entries".

 

My connection and logic are working fine but I have no idea why it's not storing the data in the "Time Entries" table and specifically in the "reasons" lookup column.

 

Please find below a picture of the "reason" column  in  the "Time Entries" table:

Roberto_el_Hajj_0-1650308242510.png

 

Whenever I submit my form, all the other field data is submitted besides this one. Please find below a picture of the Reason data column :

Roberto_el_Hajj_0-1650310164813.png

 

 

Thus, how can I achieve what was stated above?

 

Any help would be highly appreciated.

 

Thank you 😃.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
MichelK
Resolver II
Resolver II

Hello @Roberto_el_Hajj ,

 

I think it's not working because you're trying to save multiple records into a lookup column, whereas a lookup should only contain one record.

 

You have 3 ways to achieve what you're looking for:

1- An Options column on your Time Entries table with a defined Option set ( works for small sets of reasons )

2- Create a N:N relationship between Time Entries and Reasons, and use the Relate function to link the Time Entry to each reason.

3- Create an intermediary table (TimeEntryReasons) with lookups to both tables, and you create a record of this table for each reason on a Time Entry.

 

Otherwise in a lookup field, you can only store one record, so ComboBox.Selected instead of ComboBox.SelectedItems should work in principle. (And you could remove the option to select multiple items in the ComboBox)

 

Let me know if this helps!

View solution in original post

2 REPLIES 2
MichelK
Resolver II
Resolver II

Hello @Roberto_el_Hajj ,

 

I think it's not working because you're trying to save multiple records into a lookup column, whereas a lookup should only contain one record.

 

You have 3 ways to achieve what you're looking for:

1- An Options column on your Time Entries table with a defined Option set ( works for small sets of reasons )

2- Create a N:N relationship between Time Entries and Reasons, and use the Relate function to link the Time Entry to each reason.

3- Create an intermediary table (TimeEntryReasons) with lookups to both tables, and you create a record of this table for each reason on a Time Entry.

 

Otherwise in a lookup field, you can only store one record, so ComboBox.Selected instead of ComboBox.SelectedItems should work in principle. (And you could remove the option to select multiple items in the ComboBox)

 

Let me know if this helps!

Thank you @MichelK 

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 (1,976)