Button to export data as an e-mail

Hello all. I have a stock checking and ordering app.

All I want to do is be able to to have a button that will send an e-mail with all the items that require ordering. Is there a way to do this simply?

Behaviours and actions seem to require a cell to be edited or added. What if I just want to send a request to e-mail an exported list of all the rows in a slice, without being forced to update or edit something?

Also, can reports only be scheduled? Can they not be done ad hoc?

See topic " Sending Email from an Action Button" in this article https://help.appsheet.com/en/articles/961707-workflow

1 Like

But can I instigate a workflow to be fetched without an Add, Update, Delete? Or does some change need to be done to the spreadsheet?

is there an equivalent of OnButtonPressed.SendEmail without having to unneccessarily make a change to the data?

Whatever the case is we need to “make a change” in data somewhere within appsheet to trigger workflow. So called Event Listener. All the app is built in that way, Appsheet is not exceptional.

I m not sure how your app is currently build, but to achieve your goal, this should be easiest set up.

As well as other posts, I need to have a look at your table/data schema to give a precise and exact advice, but let me give you a clue.

First, you have order table assumption. At the same time you have slice which will return the list of the rows out of the table such as stock or product that required to be ordered.

Then create the new column in order table by using virtual column with list type, and app formula to return the list of stock/product waiting for order.

Make sure to add “PlaceOrder” column in order table, and make it number type with initial value of 0.

Create new action to change the value in the selected row. This action will add incrementally 1 to the “PlaceOrder” field.

Create new workflow to send email, ONLY if [_thisrow_before].[PlaceOrder]<>[_thisrow_after].[PlaceOrder]

Then on firing action, [PlaceOrder] value change, in turn this will trigger the workflow to send the email with the list of product/stock waiting for order, whose list is dynamically generated by slice.

The way I want my app to work is that you will have a stock list with current stock listed. When current stock goes below minimum stock, then a ‘To Order’ quantity will be created based on the current stock value subtracted from the maximum stock limit.

Then I have a view that is called ‘Submit’, which shows a slice view, which is filtered to only include those items with a To Order quantity > 0. What I was hoping is that when a user clicks this view, that change in view would then instigate an e-mail displaying the item, how much of it to be ordered, and it’s order code to the recipient.

Is it possible to make a change to table data, by just clicking to a different view?

I don’t want an e-mail to be sent for each individual item that changes when I edit the current stock level.

Hi again,

Understood you should have virtual column “To order” which dynamically change based on the stock level. Good approach.
Clicking / opening view only won’t work as ACTION to trigger the change to the data for now.
We need to create and fire some action explicitly to make a change in table.
That’s in my suggestion, to create the action and change data, and fire the workflow to submit email.

My thought is we should not fire the action simply by opening view. This may cause another problem, placing order unintentionally and by mistake etc. I still believe let the user to explicitly fire action by hitting action button, it will avoid mistake and also works as safety guard.

How about a scheduled report? You could trigger it once in a day and it could send all items where the amount is below the limit with one email. You could read data from the slice as Koichi proposed.

Anyway to create an action button not attached to a row? Say like, at the top of the current view? The actions to send an e-mail appear to require clicking on a row, and not a big blue button or something that says “Go!”

Can this not be done without having to use a scheduled report? Can a report not be generated as and when? Any reason it has to be time-bound? Also a scheduled report could result in generating multiple orders of the same item, as each item has different lead-times. The current stock will only be updated manually when the item arrives and is available.

The cynic in me suggests capitalism. :upside_down_face:

1 Like

The Dream…

I still believe you may consider the option I gave you. Currently we dont have action button available for now like in the shape you placed as sample, but can do something similar.

For instance, you create text fields “Place Order Now!”. And you put inline action to append.
You place this single fields only to the Detail view, none of other field you place. When your user hit this text area, then the action is fired to change the value, which will fire the workflow to submit email.

For alternative, you place new dashboard view. First view is this detail view for the text button only. Then you place the sliced table view as child. For this dashboard, use click the text button, then it fires the email workflow, and your user still can view and access the list of order items before they placing firm order.

Another option :slight_smile: Add an action button but show it as “Display inline” and then attach it to first column. If you also add a condition rule like [_rownumber]=2 or something else, it will show the action only with the first record. Then you can trigger the workflow directly from the table view.

1 Like

1 Like