cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

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
Post Patron
Post Patron

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
Highlighted
Anonymous
Not applicable

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

Highlighted
Post Patron
Post Patron

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

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

Highlighted
Anonymous
Not applicable

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.

Highlighted
Community Support
Community Support

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.
Highlighted
Post Patron
Post Patron

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
Post Patron
Post Patron

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,991)