SQL field value increment

Increment an integer field value in a database using ChronoForms.

Overview

The issue occurs when trying to increment a numeric field directly in the modify data source action, which can cause an incorrect integer value error.
Use an SQL update statement in the DB Save action to set the field equal to its current value plus one, ensuring the field is a numeric data type.

Answered
ChronoForms v8
ja jamesconwayexp386 21 May, 2025

Hi Folks

Im stuck on this.

On DB Save

I need to increase the value of an INT field by 1

I have tried a number of methods 

eg. batch_total_allocated=.$batch_total_allocated. +1

I get the error Incorrect integer value: '$batch_total_allocated + 1' for column.....

what is the correct way to do this in chronoforms

I should add I am doing this in modify data source

Max_admin Max_admin 21 May, 2025

You have ChronoForms v8 ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Pk Pkoll 21 May, 2025

Use an SQL in the DBSave like:

UPDATE tabelnaam SET veldnaam = veldnaam + 1 WHERE id = 123;

veldnaam must be a numeric datatype!

Paul

ja jamesconwayexp386 21 May, 2025

the option to use sql is not available in v8 on the DB save data

I have tried adding it to the where data statement but it will not run

Max_admin Max_admin 22 May, 2025
Answer

I have added this to the next update:

{item:title} {images:#}

When do you need the new download ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ja jamesconwayexp386 22 May, 2025

Thats great Max. A very fast response

I could do with it as soon as its available!

Thank you

Max_admin Max_admin 14 Jun, 2025

No problem!

Did you try this after the new update ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Post a Reply