Creating a button to trigger an action (front end)

Dear all,

I'm trying to export from appsheet databases data into a google slide.
I've found a nice script, and i'm able to pass data to the slides accordingly.
Next issue:
currently in order to generate the slides i have to fill in some parameters. (back end)

i would like to fill this parameters into the app itself. how can i create a button that let me fill the parameters, and then trigger the action in the backend?

let's say that i want to pass from the front-end the following parameters:
ReportCode = 1 (which is a column of the table)
and will be the condition to filter the table and generate the slides.

i hope i make myself clear with my explanations,
thanks in advance to whoever try to help out ๐Ÿ™‚

0 4 80
4 REPLIES 4

In general you may want to take a look at the slices and calling AppScript through automation articles. To allow the user to filter the necessary data you may want to take a look at the following sample app.

Slices: The Essentials - AppSheet Help

Slice row filter conditions - AppSheet Help

https://support.google.com/appsheet/answer/11997142?hl=en&sjid=14081213184665089242-NA

 


@davidemarino wrote:

i would like to fill this parameters into the app itself.


 

Sample app that lets user(s) chose the data ( meaning filter it) . The sample app is for one user. For multiple users, you will need to have a users' table to store the selection of each user. 

Slice based on user input - AppSheet

 

 

Thanks for your reply


I'll try to explain the situation better:

I have a table with on each row a "report"

the goal is:

implement a solution that allows app user to select a row (so a report) and to generate a google slide.
i have implemented a solution on the back-end with a bot, where i have a script that takes in 4 parameters:
"Title"
"Recipients"
"TemplateURL"
"Contents"
Title, TemplateURL and Contents are always the same, so i can fill it once and is correctly configured.
In the Back-end i can test the solution and works.
the issue is on the front-end:
i need from the user to fill in the "recipients" (or alternatively it could be the user e-mail if easier)

i need also the user to filter the data by a code (which is a column) in order to generate the report.

thanks for the support ! ๐Ÿ˜„

I am not sure about your script. But in general you could filter the single row using the approach suggested in the sample app. Basically the app lets user to select some options in a field in a table and then a slice filters the records based on the user selection. Since you wish the user to filter the data by the code, the approach in the app would be useful. In the sample app the user selects the color to filter the records.

Once that slice is available you could use that in a apps script bot. 

For selecting the recipient ,do you wish the user to select the recipients who are already listed in the app in a table ( their names and emails) or it can be any recipient.

You could use the same detail view where the user selects the code, in another field the recipients email could be captured.

Top Labels in this Space