Hello,
Can you please let me know how I can add a trigger that in case of a table change will add a row to another table with for example the timestamp ?
Is there a function that adds a row ?
Thank you for help!
Hello,
Can you please let me know how I can add a trigger that in case of a table change will add a row to another table with for example the timestamp ?
Is there a function that adds a row ?
Thank you for help!
The only way I know to add a row is with custom widgets. There is a showcase here. If youâre not a developer, itâs quite an advanced subject; but if your use case is simple enough, please just share a sample document on docs.getgrist.com (with public write access), and Iâll willingly help you on that point.
you can add rows with an action button
but for automatic insertion, I would suggest going the Zapier or n8n (free) route.
Thanks so much for the reply!
This is the link to the document
https://docs.getgrist.com/r8SQvLRX6WMD/Products-Price?utm_id=share-doc
I have two tables:
Table of products in which users have the ability to add products and change the price of the product.
Table of price changes in which I want to record information about who and when changed the price to look at the price dynamics.
I would be grateful for advice on how to implement this.
implement the action button (which you must click) or the n8n integration?
Here you are. If youâd like to see how it works, you should look at Data selection
, Widget options
and Open configuration
in the three-dots menu of PRODUCTS Custom
. I also added trigger formulas into PRICE CHANGES
columns, which are simple references to PRODUCTS
values.
Something wrong is not right
JPeron, how do I use on my Self Hosted Grist all the plugins you have released, like Signature, Kanban, etc?
JPeron thank you very much!
Itâs awesome.
I didnât fully understand how but it works.
Is there any chance that grist-pug-py-widget will be a standard widget built into grist ?
There is work in progress to get there:
@Rogerio_Penna I host this version myself. You might use the GRIST_WIDGET_LIST_URL for that purpose. If you donât mind waiting, I intend to make separate versions for Kanban, Signature and others once this is merged, and will submit them to GitHub - gristlabs/grist-widget: A repository of custom widgets to embed in Grist documents.
Hello, can you look at your example again and correct it, otherwise it does not work and because of this it is not possible to understand how inserting into another table works
Here you are. Someone had changed the onRecords
function name to onRecord
, which caused garbage.
Hey all,
It looks like @jperonâs example got messed up. Here is a cleaned up fork: Products Price (Community #4822) - Grist
It will open in what we call âfiddleâ mode, you can make changes to the document and it will not affect the actual example. You have the option to save a copy to your own Grist instance as well.
Thanks,
Natalie
I recreated the example given in Products Price (Community #4822) - Grist in my own application.
Or: almostâŚ
Every time I update the price on ONE row of table âProductsâ, ALL rows of âProductsâ get a new entry in the âprice historyâ. Of course, I only want the specific row I changed in âProductsâ to create a new entry in âprice historyâ.
ChatGPT recommends to adjust the python code embedded in widget. But I think I should do this via the widget option of âProductsâ, âPrice historyâ or the âwidget containing pythonâ.
Any suggestions? Iâm quite new to GetGrist.