web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / using SelectedText wit...
Power Apps
Unanswered

using SelectedText with dropdown

(0) ShareShare
ReportReport
Posted on by 12

Hi,

 

When I click on a button I would like for it to go to a screen if the selected text in a dropdown menu matches a certain word. 

For example, the code for the button states:

If(Dropdown1.SelectedText = "Test Phrase", Navigate("go to this screen", ScreenTransition.Fade))

 

However, the "=" sign of my code is always in red. Does anyone have an idea what I may be doing wrong?

 

Thanks in advance,

 

Chris

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @ChristopherOT 

    Two questions for you:

    1.  Can you please send a screenshot of the full error message caused by the red text?

    2.  What property are you putting the code in?

  • ChristopherOT Profile Picture
    12 on at

    Hi, 

     

    The error message states I have an invalid argument type.

     

     I am putting the code in the button property. A snapshot of the problem is attached.

     

    Thanks for your response! 

    error message.png
  • mdevaney Profile Picture
    29,993 Moderator on at

    @ChristopherOT

    I have a good idea of what the issue is here but I still need more info.

     

    Could you please show me the full error message?  There is a doctors stethoscope with a red dot in the top right menu.  It will show the full error.

     

    Also, can you please show me the code in the Items property of the Dropdown?

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • ChristopherOT Profile Picture
    12 on at

    @mdevaney 

     

    Hi, Thanks again for your assistance. The attached file should satisfy your requests. Please let me know if there is more you need to illustrated the problem.

  • mdevaney Profile Picture
    29,993 Moderator on at

    @ChristopherOT 

    Instead of this code

    Dropdown1.SelectedText = "Test Phrase"

     

    Can you please try this code?

    Dropdown1.Selected.Value = "Test Phrase"

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • ChristopherOT Profile Picture
    12 on at

    @mdevaney 

     

    Hi, 

     

    I still receive the same error unfortunately.  I originally tried to use SelectedValue, but realized it was not automatically populating in the fx line, but SelectedText was appearing, thus I thought SelectedValue may have been a legacy function that is no longer in use. 

  • mdevaney Profile Picture
    29,993 Moderator on at

    @ChristopherOT 

    What type of field is Documentation Type in SharePoint: single line text, Choices, or something else?

  • ChristopherOT Profile Picture
    12 on at

    @mdevaney 

    Hi,  

     

    I am not sure I follow. It was a table from excel. I also tried it again by manually coding each item in the items code line/fx line in the  dropdown menu instead of using the table. I still get the same error. 

  • mdevaney Profile Picture
    29,993 Moderator on at

    @ChristopherOT 

    Is the datasource for this app an Excel workbook on OneDrive?

  • ChristopherOT Profile Picture
    12 on at

    @mdevaney 

     

    Hi Yes.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard