Hi guys,
It shouldn’t be complicated at first thought but I cannot implement that:
simply to increment by 1 a counter each time a form is submited (and meet some conditions). All fields (child form and parent record) are in the same table.
I found that…
“Equation fields’ values can be used to set the values of other fields when inserting a connected record, but record actions that update the form’s record can not currently use that record’s equation fields’ values to set the values of other fields on the same record.” Using Record Actions
? there should be an easy solution to this simple need, no?
Michael
Do your want to know how many times a specific form has been submitted to update a specific record?
Or how many times a form has been submitted, regardless of which record was updated?
The solution to both is similar but the second requires an extra table. In both cases, you use record rules to update the counter, using a PREVIOUSLY calculated value… to get around that restriction you mentioned.
In the first case where you want to be record specific: Add two fields to your table. The first is a number defaulting to zero called “update counter”. The second is an equation which is {update counter} + 1. Call it “next update counter”. Every time the form is submitted use a record rule to set update counter= next update counter. This way every time a record is updated by this particular form (and meets your conditions), its update counter increments by 1.
For the second case where you want to just count form submissions regardless of which record: create a table called Form Counters, with 3 fields: Form name, Form Update Counter, Next Form Update Counter. Same number and equation setup as above being a number defaulting to zero and that number + 1.
So imagine the records being updated existed in a table called COMPANY. You would add a connection field as below
The FORM COUNTERS table looks like this:
With the Next Counter being a simple equation
Connect all records in the table that is updated by the form to the specific record in Form Counters with that form name (using the field default). Then every time you submit the update form (meeting your conditions) use a record rule to update the connected record in Form Counters so that connected value Form Update Counter = connected value Next Form Update Counter.
You could also add date/time, account that did the last update, which COMPANY record was last updated etc. You could even get specific and have multiple counters per form, updating appropriate counters based on what changed in the record. Lots of options.
Hope this helps.
4 Likes
Greattttt explaination Leigh. tks!
It is the first case where I want to be record specific, and the form update a counter in the same record.
I had created those 2 fields but got lost in the logic to use them in the form rules. I will try that this morning and feedback you.
Alright… I had 2 errors…
I was using a Text Formula field for Next Counter instead of Equation Formula field… 
and I had an order conflict in the Form Rules
Than works like a charm!!
thanks Leigh!!