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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,921)