![]() ![]() I’ll add another period, and these are going to be the properties of the text box. We’re interested in the “value”, which again is of type string, and which is the text that the user entered into the text box. Now we’re happy and the validation is correct. I’ll go ahead and click “OK”. Give this a save and call this “Tech Tip videos – Form Input”. I’m going to search for “textBox1” which is our text box control. If we drill into the “state” of the form and add a period, you’re going to get a list of all the different form elements. Here’s our “footer”, our “header”, and our “textBox1”. You can also give yourself more space using this expand control and you can use the control and scroll wheel to zoom in. So, the “result” property for the form is going to be the result of the form. Did they click submit or did they click cancel? You can see it’s also of type string. #Android studio debug collecting data code#We’ll select “$form1” because we want the value of the text box within the form. I’ve now selected “=$form1”. If I add a period, you can get some code completion. To do that you can add a “$”. So, “=$” and this will find all of the activities within your workflow. So, for example, if I added a “Buffer Geometry” activity, the next time I add a dollar sign we’re going to see that we have “$buffer1” as well as “$form1”. In our scenario, rather than hardcoding a value in here, we want to dynamically retrieve the value that the user entered in the form. ![]() I can also add single quotes or backtick notation as well. If we have double quotes, we’re basically just saying that this is a string. We could call this “Hello World” and we no longer have that validation warning. It’s also worth mentioning that this is the exact same as if I were to type equals and add some double quotes around this. If we go back to the workflow, the simplest method would be to hard code some text into the “Text” “Input” box. You can even use these backticks, which is called a template literal, to define a string. Let’s look at some examples. This would be considered a string where you have two quotes around some text. You can also have single quotes. But basically, a string is a text object. If I open this in a new tab, you can learn more about what a string is. You can see here if you hover over it, it’s going to tell you the type of input required – in this case it’s a “string”. The foundational scripting logic of Workflow is JavaScript so the different objects that you’re working with are going to follow the JavaScript rules and syntax. For this activity to run it needs to have some text input. You’ll see here there’s some required inputs, and we have some validation warnings telling us that “a required input is missing”. This is going to present an alert dialog to the user. In this scenario I’m going to present a dialog of the value that the user entered dynamically into that text box. Let’s drag this “Alert “onto this form. In order to retrieve that information and then pass it to another activity I’m going to use an “Alert”. ![]() We’ll jump back to the beginning of our workflow. I would want to then retrieve the value of that text box, or of the name that they entered, and do something with it. I might want to present a form to ask the user for some type of text input. Maybe I want to ask for their “Name”. We’ll start out really simple and search for a “Text Box” control and drag it onto the design area.Įach of these form elements is going to have their own properties associated with them, and more importantly, they’re also going to have an “Element ID”. So, this “Text Box” control has an “Element ID” of “textBox1”. The header control has an “Element ID” of “header” and this button bar at the bottom has an “Element ID” of “footer”. Let’s go ahead and double click our “Display Form” to customize it a little bit. We’re going to go ahead here and use our “Toolbox” control and search for a “Display Form”. Here you can see I have logged into the Workflow Designer, and I have an empty design area to get started. #Android studio debug collecting data how to#In this Tech Tip video, we’re going to take a look at how to retrieve information collected in a form using expressions within VertiGIS Studio Workflow. Let’s see it in action! Hey everybody, my name is Patrick Fingler. ![]() Additionally, it provides a demonstration of what forms look like to end-users in order to help you best support the individuals actually using your forms! This Tech Tip provides an overview of building customizable forms in VertiGIS Studio Workflow. Adding forms into your VertiGIS Studio Workflow applications can help you to capture the information you need! By using the simple, activity-based frameworks offered in VertiGIS Studio Workflow, you can easily configure customizable forms with the questions and prompts that will benefit both your users and your business. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |