cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Kudo Kingpin
Kudo Kingpin

Combo box and Share point Choice column

Hi,

Any help please?

I had a sharepoint "choice" column and I just change to a single line of text.

in my form I have removed the dropdown linked with that column and I have added a new dropdown now linked with a new table.

 

Why I dis this, because the choice columns items are going bigger and bigger so I decided to created a table.

 

I have the new dropdown pulling the items from the new table, I have the datacard updating the sharepoint list. BUT I can not get the item back to my dropdown it says expected a record value for the default

 

Any help?

 

1 ACCEPTED SOLUTION

Accepted Solutions

@sajarac 
In the private message you sent me there does not appear to be any confidential data so lets stick to the chat thread instead.  Private message is not great for problem solving since its not threaded and no one else will benefit from our work.

 

The error is generated because the Product column in your SharePoint list is a Text type but your ComboBox needs a record.  Also, I don't believe you can use Parent.Default as the Default property in this case.  Why?  Because the products list is inside another table.  Something like this will be needed in the Default property to generate a record instead.

 

LookUp(Tbl_Products, Title=ThisItem.ProductNameColumn)

 

If you need more help writing the code please share sample data from your products table inside this thread 🙂

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

View solution in original post

10 REPLIES 10
mdevaney
Super User III
Super User III

@sajarac 
Did you remember to 'refresh' the datasource after changing the column type from Choices to Text?  Make sure to do this.

 

If that doesn't work, please send me all information needed to replicate your issue including:

  • Sample of your data
  • Code used in the Items property of the dropdown
  • Code used in the Default property of the dropdown
  • Screenshot of your app to help me visualize.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

WarrenBelz
Super User III
Super User III

Hi @sajarac ,

Assuming this is a drop-down (not a combo box), the Default (it is DefaultSelectedItems for Combo Box) needs to be

{xxxx:ThisItem.YourFieldName}

where xxxx depends on the Items property of the control. When you type YourControlName.Selected. (note second dot), valid values will come up underneath. For some guidance of what they mean:

  • If your Items are Choices(ListName.FieldName) - a Choices or Lookup field), the reference will be Value
  • If they are Distinct( . . .  .), it will be Result
  • The other option is when they are based on a field value in a list (other than Distinct), then it will be FieldName (actual field name)

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.

Thank you but in fact is a combo box because I need to be able to search

@sajarac ,

Then you need the same formula in DefaultSelectedItems

 

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.

@sajarac 

Please answer my questions above.  I'd like to see what you are doing.  Otherwise I would simply be guessing and might confuse you more.

@sajarac ,

I will leave you most capable hands of my colleague @mdevaney .

I may not have the time to deal with this at the moment.

@sajarac 
In the private message you sent me there does not appear to be any confidential data so lets stick to the chat thread instead.  Private message is not great for problem solving since its not threaded and no one else will benefit from our work.

 

The error is generated because the Product column in your SharePoint list is a Text type but your ComboBox needs a record.  Also, I don't believe you can use Parent.Default as the Default property in this case.  Why?  Because the products list is inside another table.  Something like this will be needed in the Default property to generate a record instead.

 

LookUp(Tbl_Products, Title=ThisItem.ProductNameColumn)

 

If you need more help writing the code please share sample data from your products table inside this thread 🙂

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

View solution in original post

Thank you very much @WarrenBelz for trying to help.

 

@mdevaney  Thanks again your help is much appreciated. 

 

Last night I did a couple of changes and after many attempts I decided to switch to a dropdown and the form works fine but I am loosing the ability to search considering my list is over 100 items.

 

This morning I tried to implement your solution but still complaining.

 

But is OK I have been bothering too much with this .

 

Thank you in advance for all your help. 

 

sajarac_0-1600611563326.png

 

@sajarac 

Please show what Tbl_Products looks like

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (75,689)