cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyberco01
Level 8

Dropdown list with code and value in display and saving value

Dears,

I have powerapps formed linked to Sharepoint list.

Code in Combo-box items: 

Distinct(SortByColumns(ShowColumns(FirstN(Search(Filter(VendorsV2_3,ComboBox3.SearchText in AddressDescription), ComboBox3.SearchText, "VendorOrganizationName"),50),"VendorOrganizationName"),"VendorOrganizationName",Ascending),VendorOrganizationName).Result 

Code in Default: Blank

Code in Default Items: {Result: ThisItem.Title}

Code in Update of Combo-box Datacard: ComboBox3.Selected.Result

 

I need the code of the Vendor to appear in the drop-down list as well while saving data in to list.

Kindly help me acheive this.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
cyberco01
Level 8

Re: Dropdown list with code and value in display and saving value

i used the below code in the items and it worked.

Concatenate(SortByColumns(ShowColumns(FirstN(Search(Filter(VendorsV2_3,ComboBox3.SearchText in AddressDescription), ComboBox3.SearchText, "VendorOrganizationName"),50),"VendorOrganizationName","VendorAccountNumber"),"VendorOrganizationName",Ascending).VendorAccountNumber,"-",SortByColumns(ShowColumns(FirstN(Search(Filter(VendorsV2_3,ComboBox3.SearchText in AddressDescription), ComboBox3.SearchText, "VendorOrganizationName"),50),"VendorOrganizationName","VendorAccountNumber"),"VendorOrganizationName",Ascending).VendorOrganizationName)

View solution in original post

6 REPLIES 6
ojack21
Level: Powered On

Re: Dropdown list with code and value in display and saving value

if this is a combo box, then I think you can change the layout of it to double to show 2 fields.

 

Capture.JPG

cyberco01
Level 8

Re: Dropdown list with code and value in display and saving value

@ojack21 Is it possible to change an already existing combo-box in single to double?

ojack21
Level: Powered On

Re: Dropdown list with code and value in display and saving value

should be possible, since the layout is in the Data properties of your combobox, since there will be other fields available for your to map to.

 

if it's not possible, replacing your existing combobox with a new one and connecting it to your source should work also.

Community Support Team
Community Support Team

Re: Dropdown list with code and value in display and saving value

Hi @cyberco01 ,

Firstly, you could change the combo box's layout to double, then the combo box will display double fields.10148.PNG

Secondly, you need to change the formula of combo box Items. You original formula only have one field.

Try this:

Distinct(SortByColumns(
ShowColumns(FirstN(
Search(Filter(VendorsV2_3,ComboBox3.SearchText in AddressDescription), ComboBox3.SearchText, "VendorOrganizationName"),50),
"VendorOrganizationName","Vendor"
),"VendorOrganizationName",Ascending),VendorOrganizationName)

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
cyberco01
Level 8

Re: Dropdown list with code and value in display and saving value

@v-yutliu-msft ,

It is a field already available in production. so i wont be able to change to double. it will affect the existing data... will some concatenation of data work?? Kindly help as i do not want to loose the existing data

Highlighted
cyberco01
Level 8

Re: Dropdown list with code and value in display and saving value

i used the below code in the items and it worked.

Concatenate(SortByColumns(ShowColumns(FirstN(Search(Filter(VendorsV2_3,ComboBox3.SearchText in AddressDescription), ComboBox3.SearchText, "VendorOrganizationName"),50),"VendorOrganizationName","VendorAccountNumber"),"VendorOrganizationName",Ascending).VendorAccountNumber,"-",SortByColumns(ShowColumns(FirstN(Search(Filter(VendorsV2_3,ComboBox3.SearchText in AddressDescription), ComboBox3.SearchText, "VendorOrganizationName"),50),"VendorOrganizationName","VendorAccountNumber"),"VendorOrganizationName",Ascending).VendorOrganizationName)

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,119)