How do I set a Button value from a variable?

np shared this question 1 year ago
Answered

Hi,

I am trying to update a value (caption) of a submit button using a variable. But haven't been successful yet.

I tried that using Set Value during Tap Event to assign a value to the button as a Fixed and also via expression ...

Nothing worked.

The button is a part of a master item which is used in a template. I am using this template to create screens.

Depending on the values entered in the text boxes in the screen I want to update the value of the button (which is defined in the master item and used in the template)

Will you please help me in setting this?

Thanks,

np

Comments (3)

photo
1

Hi there,


Do you have an example .vp file of what you're describing so we can take a look? You can attach it in a .rar format, or upload it to a file sharing service such as Dropbox, and attach the link to it here.


Best,


Sonia Durán

photo
1

Hello, I think I have fixed the issue but please still check it out.


I have extended the login widget to demo the scenario.

I have attached my .vp file in the zip format.


Is there link that explain the scope of the variables in the prototyping ...e.g. global vs local ?

Similarly how to override or add to events actions created in the templates or master widget?


Thanks,

np

photo
1

I also see that in the event sequence the even if the when condition is true the flow falls thru the else clause unless I block it by adding another when condition. From the programming background, I was expecting the execution to come out of the case structure as soon as the first condition is met and the DO actions under that are executed.

Thoughts?