04-13-2014 11:52 AM - edited 03-14-2019 01:21 PM
Hi there,
Is it possible to change an if-statement from "true" to "false" or vice versa by calling an extension?
Thanks.
Solved! Go to Solution.
04-13-2014 08:15 PM
Yes. You will need to practice this first before you try to implement it in your script. Or, rather, I'm asking that you do. Just learn the basics first.
First up, you will need to acknowledge that you will need to store this data somewhere persistent. I.e., External database, external web server, or possibly even the Document repository. I'll lead with the repository as it's easy and doesn't require the Premium license that the external database does.
Now that we've determine where we are going to store the data, you need to know how to store the data. You do this in a script with a minimum of two steps:
And one variable
Your user account may be called something different. Authenticate the user first, then upload the document second. Practice this in a new blank script using the F10 key (Step Over) via the Active Debugging feature. No saving, uploading, application, trigger or phone call required.
Hint: Use the following as your Document to upload TEXT[true], use the following as your Language L[] and use the following for your name "my_file.txt"
Now that you've figured out how to store the data, let's figure out how to read the data. In a completely new script, you'll need only two steps:
*Three if you count the Annotate step.
And one variable
Drop the Set step in a set it like so:
Set my_value = DOC[my_file.txt]
Next, drop in the If step and set it like so:
If (my_value)
True
/* It's TRUE */
False
/* It's FALSE */
Now, kick off that Active Debug again (F10) and check your work. If you got it working, then the last thing you need to do, is figure out how to present the caller with a menu, 1 for TRUE and 2 for FALSE. That's it.
Happy coding.
I hope that helped.
04-13-2014 12:23 PM
Hi,
can you please tell us more. In what context?
G.
04-13-2014 12:40 PM
Hi Gergely,
I got a script with if-statement true of false. The statement is always "False", but it's "True" it will go to another part of script and execute it. At this moment we go to Application and the press the "Checkbox" to achieve this.
I was looking for a way to achieve this by calling an extension and it will change to "True" or "False".
Please let me know if you have any further question.
Thanks
04-13-2014 08:15 PM
Yes. You will need to practice this first before you try to implement it in your script. Or, rather, I'm asking that you do. Just learn the basics first.
First up, you will need to acknowledge that you will need to store this data somewhere persistent. I.e., External database, external web server, or possibly even the Document repository. I'll lead with the repository as it's easy and doesn't require the Premium license that the external database does.
Now that we've determine where we are going to store the data, you need to know how to store the data. You do this in a script with a minimum of two steps:
And one variable
Your user account may be called something different. Authenticate the user first, then upload the document second. Practice this in a new blank script using the F10 key (Step Over) via the Active Debugging feature. No saving, uploading, application, trigger or phone call required.
Hint: Use the following as your Document to upload TEXT[true], use the following as your Language L[] and use the following for your name "my_file.txt"
Now that you've figured out how to store the data, let's figure out how to read the data. In a completely new script, you'll need only two steps:
*Three if you count the Annotate step.
And one variable
Drop the Set step in a set it like so:
Set my_value = DOC[my_file.txt]
Next, drop in the If step and set it like so:
If (my_value)
True
/* It's TRUE */
False
/* It's FALSE */
Now, kick off that Active Debug again (F10) and check your work. If you got it working, then the last thing you need to do, is figure out how to present the caller with a menu, 1 for TRUE and 2 for FALSE. That's it.
Happy coding.
I hope that helped.
04-14-2014 02:24 AM
Hi Anthony,
Thanks. I will try to work on your explantion.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide