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
Super User

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
Super User
Super User

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).

 

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,384)