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 News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,011)