cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
m365newuser
Frequent Visitor

Global Variable is blank

Hello Everyone,

 

I am declaring a global variable inside a text label with the following command : Set(a, 9); 

where a is the variable name

9 is the value

However, it is not storing the value for a and is always blank.

Can someone tell me what i am doing wrong

 

Picture attached for referenceScreen Shot 2021-07-26 at 7.53.58 PM.png

1 ACCEPTED SOLUTION

Accepted Solutions

Ok then please use them under on screen visible property. Whenever your screen will visible these data will get their values.(you can use app load property too).

 

View solution in original post

8 REPLIES 8
eka24
Super User III
Super User III

Have you click the buttom to activate the variable?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

It's a text label with an OnSelect property. (so there is nothing for me to click as such)

I suggest you put the formula OnSelect a button, then insert a label and put in the text property of the Label you have inserted. What you are using is not a label, it an Icon.

9.PNG

 

b.PNG

 

You can also maintain your code on the Icon but click or select it since it has OnSelect property, it will work. But the result of 9 you expect cannot be shown on an Icon. Insert a Label and putin the text property:

1.PNG

 

2.PNG

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Abhilash_Swain
Resolver II
Resolver II

Never tried with textbox onselect property. You can debug .use below methods.

1. Copy the codes to a button and click.if it works good, then change the onselect property .

2. If still it appears blank, check if you have used the same variable somewhere else and setting to balnk.

 

If it ll help give a upvote.

These are fixed values, therefore I don't want to use a button to store values. As per your picture the user would have to manually enter the values.

Also just for clarification, I am not trying to display the value of a on the icon itself. 

These are fixed values, therefore I don't want to use a button to store values. 

Ok then please use them under on screen visible property. Whenever your screen will visible these data will get their values.(you can use app load property too).

 

View solution in original post

If you dont want the user to manually click or select the button, then put the formula OnVisible of the Screen or OnStart of the App. That way, it becomes automatic.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,834)