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

Sharepoint form: dropdown to change value on form

Hi All,  
 
I have a custom sharepoint form that has a dropdown menu that gathers information from a sharepoint list. 
The form should show the name associated with the current PDM on duty based on what I selected from the dropdown as per the example below. 

 

Image

It does do so when I add the respective datacard. However the name displayed does not change based on the selection in the dropdown but is stuck with the selection I made when adding the card in powerapps. 

 

Please see below the code behind the "Name" datacard...

 

Image

 
What is the best way to achieve this? Please note that it is not required for the name to then be populated. It is just so that the person selecting the "PDM on duty" will know who the associated person is before it is added to the list.
 
Many thanks and best regards,
 
Tom.
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Sharepoint form: dropdown to change value on form

Hi @tupues ,

Is there a Person column in your "fltpdmXYZ" list to store the person the corresponding Title related to?

 

I assume that there is a person column in your "fltpdmXYZ" list to store the person the corresponding Title related to, is it true?

 

Please consider modify your formula as below (set the Text property of the Label to following):

LookUp(FltPdmXYZ, Name = PDMComboBox.Selected.Value, PersonColumn.DisplayName)

Note: I assume that the "PDM on duty" column in your custom form references values from the Name column in your "fltpdmXYZ" list. The PersonColumn represents the Person column in your "fltpdmXYZ" list.

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Community Support Team
Community Support Team

Re: Sharepoint form: dropdown to change value on form

Hi @tupues ,

Could you please share a bit more about the "PDM on duty" column in your custom form? Is it a LookUp column, Choice coumn or Person type column in your SP list?

Do you want to change the displayed name value based on the selection within the "PDM on duty" ComboBox?

Could you please share a bit more about the "Name" datacard in your custom form? Is it a custom data card?

 

I assume that the "PDM on duty" column in your custom form is a LookUp column, which reference values from other SP List, is it true?

Based on the needs that you mentioned, I think the LookUp function in PowerApps could achieve your needs. On your side, you should add the another SP list as data source in your app. Then look up the corresponding name value based on the selected "PDM on duty" value within your another SP list.

Within your custom form, set the Text property of the Label within your Name Data card to following:

LookUp('YourAnotherSPList', ReferencedColumn = PDMComboBox.Selected.Value, NameColumn)

Note: The 'PDM on duty' column reference values from the ReferencedColumn in your AnotherSPList.

 

In addition, if the "PDM on duty" column is a Person column in your custom form, please consider take a try with the following workaround:

Within your custom form, set the Text property of the Label within your Name Data card to following:

PDMComboBox.Selected.DispayName

 

More details about the Filter functions in PowerApps, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
tupues
Level: Powered On

Re: Sharepoint form: dropdown to change value on form

Hi @v-xida-msft 

 

Many thanks for your reply!

 

Could you please share a bit more about the "PDM on duty" column in your custom form? Is it a LookUp column, Choice coumn or Person type column in your SP list?

 

--> It is a lookup column which populates a column in a list called PDMs. The list from which the data is gathered is called "fltpdmXYZ"

 

Do you want to change the displayed name value based on the selection within the "PDM on duty" ComboBox?

 

--> I want to show the name of the person behind the job title selected in the drop down. Since the titles in the dropdown are quite cryptic it will help the person making the selection identifying the correct individual.

 

Could you please share a bit more about the "Name" datacard in your custom form? Is it a custom data card?

 

I had a custom data card initially however changed it to a label now. The closest I got to a result is in the screenshot along with the associated error message...

 

Please also find the results of the application of the other suggested solutions.

 

What I need essentially is to have the Person behind the job title displayed in the form when making a selection from the dropdown. Whatever way will achieve this I am happy to take.

 

Many thanks again for your ongoing support!
 
Best regards,
 
Tom
Community Support Team
Community Support Team

Re: Sharepoint form: dropdown to change value on form

Hi @tupues ,

Is there a Person column in your "fltpdmXYZ" list to store the person the corresponding Title related to?

 

I assume that there is a person column in your "fltpdmXYZ" list to store the person the corresponding Title related to, is it true?

 

Please consider modify your formula as below (set the Text property of the Label to following):

LookUp(FltPdmXYZ, Name = PDMComboBox.Selected.Value, PersonColumn.DisplayName)

Note: I assume that the "PDM on duty" column in your custom form references values from the Name column in your "fltpdmXYZ" list. The PersonColumn represents the Person column in your "fltpdmXYZ" list.

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
tupues
Level: Powered On

Re: Sharepoint form: dropdown to change value on form

Hi there, 

 

This did the trick. Many thanks again. Please find below the code I ended up using. 

 

LookUp(FltPdmXYZ,Title = DataCardValue2.Selected.Value, 'Person txt')

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

Top Kudoed Authors
Users Online
Currently online: 175 members 4,851 guests
Please welcome our newest community members: