Buy Now
Sign in

Can't skip missing fields in save data action

healyhatman , October 18 2018
healyhatman 5.7
October 18 2018 #380894
I want to have a save data action where only the fields that have been filled in will be updated. So naturally in the override I put
field:{data:field}/-
However on one website I just get "Error:0" (super unhelpful). On another site in the debug under the info section for the save data action I get "field has been skipped" but then it goes ahead and updates the value with an empty string anyway.
So what I've had to resort to doing is
field:{data:field/(var:read_data#.model.field)}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums
GreyHead 63.3
October 18 2018 #380899
Hi healyhatman,
It's a workaround but you could read the saved data record, update the changed fields and then re-save it. That way you do have full control.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
healyhatman 5.7
October 18 2018 #380901
Yep that's what I'm doing, at the bottom of my post - read the data, and use the existing data as the default value if the field's form data is empty.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums