Hello everybody. I'm trying to make a pdf report, which a user can create with the click of a button. I then created an action that changes the value of a yes / no column in the table. Then I created a bot that:
when an update is made in the table it executes the process
1. Performs tasks for creating the report
2. brings me the value of the column to "no"
I saved and tested the bot but nothing happens. Where can I go wrong? ... the app in question has not yet been deployed
Solved! Go to Solution.
Likely it is that the path is incorrect. AppSheet uses relative pathing based on the location of the sheet itself. You only need to insert into the File column the portion of the path under the sheet.
For example, lets say your sheet is in the location:
appsheet/data/<<app folder>>
When you bot runs, it places the generated PDF into:
appsheet/data/<<app folder>>/Files
In the File column for the PDF, you will only need to specify:
Files/<generated file>.PDF
Make sure the Bot is enabled.
How did you test the Bot? From your images there is no condition set and the Bot is configured to run on Updates Only. So you only need to EDIT a row in the Piani table to trigger the Bot. If testing with your button, it needs to CHANGE a column on a row in the Piani table .... meaning if it is setting the value that is already present, it will not be registered as a CHANGE.
If all of the above seems ok, then you need to check the Monitor page. At the top of the Bot is a button labeled Monitor. Tapping it will take you to a main page to display the bot executions. You will need to make sure to select your app in the far left panel then select the Runs tab at the bottom. Then in the Bots panel, scroll down to find you Bot Group Header. Under this is a list of executions that reflect either COMPLETED, ERROR or PENDING. Check for an error and then drill into the details (middle and right side panels) to see the nature of the error. If you find no Bot executions for you Bot, then the Bot is not being triggered and you will need to take a closer look at the Bot configuration and how you are testing it to determine why it is not triggering.
I have not set conditions yet because I first wanted to find out if the result of the report was the desired one. An entry in the template was actually wrong to generate the pdf. Now the process marks it for me completed, but in reality it does not open any pdf (I'm testing it on a desktop station). Do you have any idea what this might depend on?
Ok I was able with your help to save the pdf in the app folder .... but I would like you to open it directly for me once created. in practice, a user clicks the button and the pdf report opens. How can it be done?
You cannot automatically open a generated file on a specific device - at the moment. A Bot runs on the server based on a row add or edit. Currently AppSheet does not have "callback" capabilities to perform automatic actions on a specific device.
The best you can do is have the app display something to indicate that the file is present. For example, the bot can populate the file path details into a File column. Upon the next sync on your desktop (normally happens immediately after a Save action), the app can show a file icon to indicate there is a PDF to be viewed. The user simply needs to tap the icon to view the file.
ok. thank you!!
i did as recommended. The bot saves the directory of the created pdf file in the [DIRECTORY PDF] column. Then I created an action that opens the [DRIECTORY PDF] column link. Unfortunately, clicking the icon does not appear, while on google drive it is correctly saved.
What am I missing?
Likely it is that the path is incorrect. AppSheet uses relative pathing based on the location of the sheet itself. You only need to insert into the File column the portion of the path under the sheet.
For example, lets say your sheet is in the location:
appsheet/data/<<app folder>>
When you bot runs, it places the generated PDF into:
appsheet/data/<<app folder>>/Files
In the File column for the PDF, you will only need to specify:
Files/<generated file>.PDF
GREAT. it works perfectly. thank u very much
User | Count |
---|---|
31 | |
11 | |
3 | |
2 | |
2 |