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 / Setting variable value...
Power Apps
Answered

Setting variable value as text and setting visibility based on variable

(0) ShareShare
ReportReport
Posted on by 17

I'm a newbie to Powerapps but I've searched both this forum and the internet but cannot figure out my problem.  I'm hoping it's something really simple.

The form is created from a SharePoint list:

1. In the OnVisible property, I wanted to set the text and show a field if the value of a varible is something.

     a. In the OnVisible of the screen, I set a variable: Set(varStatus,'Annual Evaluation-Salaried'.Status)

     b. The Text property of the textbox is set to varStatus (This doesn't work)

     c. The Visible property of the textobx is set to varStatus="Draft-User"; (This doesn't work)

     

What am I doing wrong?

Categories:
I have the same question (0)
  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Did you use the PowerApps customize forms button in SharePoint to create the form, so you have a control called SharePointIntergration?

    If so try this in the OnVisible:  Set(varStatus,SharePointIntegration.Selected.Status)

    *This assumes that Status is a text column in SharePoint

     

    FYI: If you make this change in the studio and want to test it right away then you need to navigate to another screen and back for the OnVisible event to trigger.

     

    I assume 'Annual Evaluation-Salaried' is the name of the list and if so 'Annual Evaluation-Salaried'.Status will return a one column table representing the status of each record. If this is the cause the text should have given an error about an unexpected data type expecting text.

  • DougPunchak Profile Picture
    2 on at

    Thanks Jim, this helped a lot!  I've been trying to figure out PowerApps and all the different areas and nuiances which is proving to be difficult.  When to use the onVisible in the App, Form, now the SharePoint Integration.  It's daunting.

    I'm trying to find the 'mark as answer' and as soon as I do, I'll mark your response. 🙂

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
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard