I am trying to add a button to โSend Orderโ to an โOrderโ UI that is displaying a slice of data from an Google Sheet โInventoryโ table.
The underlying โInventoryโ Google sheet includes 3 relevant columns, โCurrent Stock Levelโ, โMinimum Stock Levelโ and โOrder Amountโ. The โOrder Amountโ column is automatically calculated by a formula in the google sheet that calculates the difference between the โMinimum Stock Levelโ and the โCurrent Stock Levelโ.
There are multiple rows in the Inventory table, but only those with a โCurrent Stock Levelโ lower than the โMinimum Stock Levelโ will need restocking. The slice limits the table to only those items that have a positive order amount (i.e. the โCurrent Stock Levelโ is lower than the โMinimum Stock Levelโ).
This table and the slice are working perfectly - it is only showing those rows that need to be restocked, along with the calculated โOrder Amountโ.
I now want to add a button that will appear on the Table view whenever at least one row needs to be restocked (i.e. the slice includes at least one data row).
When the button is clicked, I want it to create a CSV and PDF file containing all of the rows in the table (limited by the slice). These files to be formatted based on a template. I then want an email to be created and sent to the userโs email address, with the CSV file and the PDF attached. Ideally, I would like the user to be able to choose who to send the email to (from a list of users in a userโs table).
I donโt want the user to have to click a row on the table in order to have the button appear. I want the button to always be visible, as long as there is at least one row visible in the slice.
Is there any way to achieve what I want - Iโm really struggling to see how to
I can kind of see how to do 4-8 from some of the online examples, but Iโm stuck on steps 1-3, so any help would be greatly appreciated.
Thanks in advance!
Youโd have to include a selection somewhere for the user to do this. Perhaps in their user settings?
Many thanks for the replies Marc, but I still seem to be having problems.
I set the behaviour action as indicated and it seemed to make the button icon appear as hoped the first time. Unfortunately, that stopped as soon as I resynched and I can now only get the action button to appear when the user selects at least one row, no matter what settings I use on the behaviour/actions.
I have tried to get my head around the automation, but I just canโt make any useful progress. Perhaps if I limited my question more.
I have 3 tables, โInventory Itemsโ, โOrder Headerโ and โOrder Inventoryโ. The Inventory Items table contains multiple inventory items, some of which have a Packs To Order column with a value greater than 0.
Ideally, I want a โSend Orderโ button to always be visible on the Inventory Items view.
Clicking this button should do the following:
Insert a new row into the Order Header table, auto generating a uniqueid for the Order Number column on the new row. Set the Status column of this new row to โPendingโ.
Copy all records with a Packs To Order value > 0 from the Inventory Items table to the Order Inventory Table, setting the Order Inventory.Status column to โPendingโ.
Update the Order Number column all of the records on the Order Inventory table with a blank Order Number and Status = โPendingโ to be the most recent order number from the Order Header table (I assume I can retrieve this with a select and then pass it to the update row operation?).
Create a PDF document containing the Order Header and Order Inventory child items for all Order Header records with a Status = โPendingโ. Use a pre-defined template to make this PDF pretty.
Create an email, attaching the PDF to it.
Send that email to a pre-defined email address.
Update the Order Header.Status for all records with Status=โPendingโ to โSentโ.
Update the Order Inventory.Status for all records with Status=โPendingโ column to โSentโ.
Although it is a lot of steps, it shouldnโt be that hard to doโฆshould it?
I made no progress with the above, so I thought maybe I could just use an Action associated with the Order Header table, so that when a new record is added to it, I then trigger something (anything). Unfortunately the only option Iโm allowed for โData Changeโ appears to be โDeleteโ. There are no other actions available on the task creator, even though the table has all of the normal Add Update Delete actions listed for it.
Am I being really dense here or is this something that either just doesnโt work properly or is being artificially limited/crippled as I only have the free license and/or my app is only in prototype?
At the moment, I canโt even set up a Task
Honestly, this is far too much to respond to. You really need to learn some of the stuff yourself and narrow down the issues that you really canโt figure out, then post those specific questions (or better, search for the answers). Either that or try and hire someone to help you personally (I can assist you in this regards if required).
User | Count |
---|---|
42 | |
33 | |
24 | |
23 | |
14 |