cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RomanKorchak
Level: Powered On

Dropdown with Id and Value from Sharepoint list

Hi All

I have a SP list with PropertyId and PropertyName columns.

I need to have dropdown that would show PropertyName list to select from and been able to get PropertyId of selected item. 

I know it works if Items set as Table({ID,Value}) but cannot figure out how to do it with SharePoint list. 

Thanks 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Dropdown with Id and Value from Sharepoint list

Hi @RomanKorchak ,

Do you want to get PropertyId value by selecting PropertyName value in a drop down?

Firstly, you need to understand that the meanging of "DropDown1.Selected".

If you set the drop down's Itmes to listname, value to PropertyName field :

Then, "DropDown1.Selected" represent a record of the list.

 

Secondly, if you want to get one spefic field value of a record, the formula is determined by its data type.

I assume that PropertyId is Text or Number data type. Both of them is simiple data type.

Jsut use this formula can get its value:

DropDown1.Selected.PropertyId

However, if PropertyId is complex data type, for example: choice,  lookup, you need some special formulas.

Here's a doc about how to use complex data type of Sharepoint list in PowerApps for your reference:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

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.
4 REPLIES 4
RezaDorrani
Level 10

Re: Dropdown with Id and Value from Sharepoint list

Hi @RomanKorchak 

 

In your dropdown list

Items property will be the sharepoin tlist as data source (which contains your property id and property name)

 

Value porperty of dropdown control selected ProperyName

 

and if you need the Property Id associayed with it

Use dropdown.Selected.PropertyID

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

Community Support Team
Community Support Team

Re: Dropdown with Id and Value from Sharepoint list

Hi @RomanKorchak ,

Do you want to get PropertyId value by selecting PropertyName value in a drop down?

Firstly, you need to understand that the meanging of "DropDown1.Selected".

If you set the drop down's Itmes to listname, value to PropertyName field :

Then, "DropDown1.Selected" represent a record of the list.

 

Secondly, if you want to get one spefic field value of a record, the formula is determined by its data type.

I assume that PropertyId is Text or Number data type. Both of them is simiple data type.

Jsut use this formula can get its value:

DropDown1.Selected.PropertyId

However, if PropertyId is complex data type, for example: choice,  lookup, you need some special formulas.

Here's a doc about how to use complex data type of Sharepoint list in PowerApps for your reference:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

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.
RomanKorchak
Level: Powered On

Re: Dropdown with Id and Value from Sharepoint list

Just tried it and it did not work.

So I have Gallery from an SP list "Tasks" with columns: Task,TaskPropId;
Each line of the gallery has dropdown "SelectProperty" with items=Properties (Properties is SP list with following fields: PropertyId, PropertyName, PropertyAddress)  and label "PropId" that should have Property Id . 

I tried setting PropId.Text=SelectProperty.Selected.PropertyId but nothing happens (not on load neither on dropdown change). 

 

Highlighted
Super User
Super User

Re: Dropdown with Id and Value from Sharepoint list

Hi @RomanKorchak 

 

Can you share a screenshot of the setup in your app? The description provided by you is a bit confusing.
 
From what I understood, You have a gallery pointing to Tasks SP list. Can you please confirm if the Tasks list is related to Property list? 
 
A simple solution based on the initial description shared by you:
 
Dropdown -> Items -> Properties
 
Label -> Text Property  -> SelectProperty.Selected.PropertyId

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 166 members 5,286 guests
Please welcome our newest community members: