Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Sharepoint form: dropdown to change value on form

(0) ShareShare
ReportReport
Posted on by 121
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.
  • tupues Profile Picture
    121 on at
    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')

     

  • Verified answer
    v-xida-msft Profile Picture
    on at
    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,

  • tupues Profile Picture
    121 on at
    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
  • v-xida-msft Profile Picture
    on at
    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,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard