Looking for some advice I want to use a
Looking for some advice. I want to use a task extension to update multiple columns on a row, but it's not obviously documented. There's a
change
param that I can use, but the type is any
so I'm unsure how I should use it. If I want to update multiple columns, should I do something like add the new/updated columns as properties to change
then do ref.update(change)
within the extension?6 Replies
In addition to this, I kinda want to create a single extension and then use it across multiple tables. Is this possible as well?
Any ideas @harini and @Bhavya ✨ ?
Ah, I went back and found your original advice @Bhavya ✨ : https://discord.com/channels/853498675484819476/853498675991937056/1098541793366245407
Hey @mattsch, yes! You can simply use
ref.update()
in your extension to update specific columns in your row.
For example:
Here, payload
is the field key and event
is the value to be updated.is it possible to trigger the extension to run on all rows, or even a single row, similar to how derivatives can be triggered?
@mattsch, the Extensions can be triggered via the events selected in the Extension configuration. So, you can enable
update
for the fields and any changes in those column's data would trigger the extension.
You can also use logging.log()
statements to ensure the triggers: https://docs.rowy.io/cloud-logs.Thanks @Bhavya ✨ . I had them configured, but I needed to manually trigger it again after updating the extension code.
I'm trying to figure out a pipeline of pre-populated data that can then be enriched, so I ran my pre-populated function to import and then the extension did its magic, but it would be nice if there was a way to manually trigger the extension on one or all rows.
Great to hear that it worked for you, @mattsch! Thank you for sharing your feedback about the manual trigger option. We're actively working on building some cool features will resolve the issue of manual triggering of these scripts. Stay tuned for updates! 🚀