Set Variable
You are already aware of creating and using variables. Studio also offers the feature to set the value of the variable as a part of the Action Flow. These values can then be used in Rules and even to bind to controls.
- Select Variable: This allows you to select variables.
- Enter value: This allows you to assign the custom value to the variable or fetch it based on the keywords.
You can set values of multiple variables during the process depending upon your action flow.
You can then specify a condition as to when to execute the action and which environment. An Action Unique name is important, that would help you identify the tasks in the flow. Here you also have the option to specify whether to wait for an action response to move to the next step.
Share via Whatsapp
There can be situations where you would want to send a WhatsApp message from your app. In that case, you can make use of the Share via WhatsApp from the Action Flow to carry out the task.
- Message text: is the mandatory field to send a WhatsApp message, add the Message Text. You can also make use of the Keywords to use for sending messages.
- Image URL: Is the URL of the image to be sent in the WhatsApp message.
- URL: This is the URL that you want to share in the WhatsApp message.
Enter the details as required. Each has an option to add keywords. Thus you can make use of the form control and other input values to complete the action.
Now, whenever you click the Action button your action flow would be triggered and the specified text message would be sent.
In the example below, we will be sending the message that is entered in the Text control. Now when you click the “Send Whatsapp Message” button, the action flow is triggered. Here what happens is that WhatsApp on your device is opened and you can choose the contact from your list to send the message to. You do not need to enter your phone number through the app. The Whatsapp app on the device is opened and you simply need to select your contact and send the message.
In this example, we will also add the Image URL and the URL to share along with the image.
Copy to Clipboard
Now there are times when you need to use the Screen data by copying it to the clipboard and using it at a later stage.
Under Edit block you now have a Copy to Clipboard task that allows you to keep the selected item copied to the clipboard and then paste it to the desired place at a later event.
You can have your custom text or the text from the Keywords which include control data, variables, and action output, copied to the clipboard. To copy to clipboard, under Action flow > On-screen Action > Edit block, enter the text to be copied or select the Keywords. Click Continue.
- Add the Action Unique name and conditions to execute and the environment and click Finish.
- Now whenever you have an Action event then the action flow would be triggered and the specified text would be copied to the clipboard. You can then go to the location where you want to paste it. On the mobile app, you can long-press and use the paste option. In this example here we are pasting it in the text control below the Action button. The text is copied to the clipboard when you click “Copy text to clipboard”.
Add to calendar
You can add an event to your Calendar using the action flows. You need to have the date picker controls on your forms. Typically you can have different scenarios like creating a meeting reminder for an appointment with the Doctor, team meeting, and so on. You can use it to add events to your device calendar. The event title, start date, and end date for the event to be created can be passed as keywords and control values to the respective fields.
Now when you run the App, you can enter the Event details, select date and when you click the Action button, the event would be recorded to your default Calendar app on your devices.
Download file
You can have scenarios where you are generating a file or even fetching it from a specific source like say test reports, product images, and so on. Now if you want to provide the user with the capability to download the file on a click event action you can add the Download File task to the action flow. Typically you would use the Keywords to provide the source or URL of the file to download. So whenever the action triggers the file would get downloaded to the default location.
Set Message
For a detailed understanding refer to this article here.
Confetti
Studio has another action that can be useful when using the rating actions where you are providing feedback, or have completed filling up a form, or completed an assessment and scored above a certain number of points, then in that case you add a Confetti action to represent celebration. It can be triggered as an action in your action flow.
It is a simple utility task that can be customized to suit your application.
So under the Action Flow > Utility block, select the Confetti action.
Here configure the following fields:
-
Particle: Is the number of confetti particles to be spread on the screen.
-
Spread: Specifies how far off the center the confetti can go, in degrees to be spread across the form or in other words the angle that it spreads across from the X origin. So in case, it is set as 10 it will be small confetti creating an angle of 10 degrees from the X origin.
-
X origin: This is the value between 0 to 1 to specify the X-axis coordinates for the confetti origin. E.g. 0.5 will take it from the center of the X-axis or if you set it as 0.2 then it would originate from closer to the left corner.
-
Y Origin: This is the value between 0 to 1 to specify the Y-axis coordinates for the confetti origin. E.g. 0.5 will take it from the center of the Y-axis or if you set it as 0.2 then it would originate from closer to the bottom of the screen or from more towards the X-axis.
Click to Continue and enter the task name. You can also specify the condition to when to execute and the environment to execute it in.
Let us take an example to accept Rating for a Restaurant. So in this case, if the rating is more than or equal to 4 we will Thank the user and spread Confetti after that. So in this case let us add a rating control and an action button. In the action flow, we will add a branch to check the rating and add only a popup if the rating is below 4 and a popup task and confetti task if more than or equal to 4.Optionally you can also specify the condition in the Confetti action to Execute when Rating >= 4.
Now whenever you run this form, you can see the confetti spread when the rating is more than or equal to 4. The following preview is for X origin as 0.5. So note how it appears in the center.
Now if we take an example to set the X Origin as 0.1 and the Spread as 45, then see how the particles appear from the left corner.
WhatsApp Message
For a detailed understanding refer to this article here.
Query JSON
Now with the on-screen action of Query JSON you can run SQL-like queries with the support of AlaSQL.
We can filter JSON values by implementing SQL queries on it. This is helpful to query JSON values within the controls using trigger actions. The idea is to work on NoSQL data sources using SQL queries.
This action is quite simple but very powerful utility action. Studio allows you to utilize SQL to query your data as though they were tables in a data set.
Select the action and write SQL-like queries. You can learn more about it from our dedicated article for querying JSON using SQL.