Hi,
I saw the possibility to have a function in the set up menu called "Modify data". I don't find any info or tuto on it while i'm thinking it could be very useful for me.
Do you know where i can find any information on it ?
I saw the possibility to have a function in the set up menu called "Modify data". I don't find any info or tuto on it while i'm thinking it could be very useful for me.
Do you know where i can find any information on it ?
Hi gebonimo,
The modify data is used to build a custom data provider, after the modify data is processed you can use {var:modify_data_name} to access the data which was present in the modify data values, so if the data provider to modify data was {data:} and you add this in the data override:
Best regards
The modify data is used to build a custom data provider, after the modify data is processed you can use {var:modify_data_name} to access the data which was present in the modify data values, so if the data provider to modify data was {data:} and you add this in the data override:
x:yThen {var:modify_data_name} will have all the {data:} values + x = y
Best regards
In my case i'm trying to modify a hidden field after a read_data.
So i have to put in the data provider {var:read_dataX}
And in the "Data override"
hiddenX:{var:read_data9}
Then in my db_save
Db_field:{var:modify_dataX}
Right ?
So i have to put in the data provider {var:read_dataX}
And in the "Data override"
hiddenX:{var:read_data9}
Then in my db_save
Db_field:{var:modify_dataX}
Right ?
Hi gebonimo,
it depends, what is the select type in your "Read data" ?
But the scenario is correct, this is what you need to do, what is the {var:read_data9} ?
Best regards
it depends, what is the select type in your "Read data" ?
But the scenario is correct, this is what you need to do, what is the {var:read_data9} ?
Best regards
The read_data should be an foreign key given by another field in the form (don't know if i'm clear).
β
read_data9 is the read data where i have my data to use into my db save. I can't succeed using the result of my read_data in my db save. So i thought this might be a good solution
β
read_data9 is the read data where i have my data to use into my db save. I can't succeed using the result of my read_data in my db save. So i thought this might be a good solution
Hi gebonimo,
β
You need to check the values you have with a debugger, and based on that you decide if the modify data is going to be useful, could you please post some debug info and let me know what you need to save exactly ?
β
Best regards
β
You need to check the values you have with a debugger, and based on that you decide if the modify data is going to be useful, could you please post some debug info and let me know what you need to save exactly ?
β
Best regards
[pre]
[br]Array[br]([br] [page] => Chronoforms6[br] [cont] => manager[br] [chronoform] => modif_mot_unique[br] [event] => submit[br] [Model1] => Array[br] ([br] [CleEtrMotFrP] => 8[br] [Traduction] => t[br] [Contexte] => t[br] [CleEtrGenreP] => 1[br] [CleEtrNatureP] => 11[br] [CleEtrCommune] => 31[br] [CleEtrCanton] => 1[br] [CleEtrDefP] =>[br] )[br][br] [button12] => [br])[br][br]Array[br]([br] [validate_fields2] => Array[br] ([br] [log] => Automatic validation enabled.[br] [var] => 1[br] )[br][br] [read_data9] => Array[br] ([br] [log] => Array[br] ([br] [0] => SELECT `Data9`.`CleEtrDef` AS `Data9.CleEtrDef` FROM `t_mot_francais` AS `Data9` WHERE `Data9`.`id` = '8' LIMIT 100;[br] )[br][br] [var] => Array[br] ([br] [0] => Array[br] ([br] [Data9] => Array[br] ([br] [CleEtrDef] => 9[br] )[br][br] )[br][br] )[br][br] )[br][br] [save_data10] => Array[br] ([br] [data] => Array[br] ([br] [CleEtrMotFrP] => 8[br] [Traduction] => t[br] [Contexte] => t[br] [CleEtrGenreP] => 1[br] [CleEtrNatureP] => 11[br] [CleEtrCommune] => 31[br] [CleEtrCanton] => 1[br] [CleEtrDefP] =>[br] )[br][br] [_error] => Error saving the data.[br] [log] => Array[br] ([br] [0] => INSERT INTO `t_trad_patois` (`CleEtrMotFrP`, `Traduction`, `Contexte`, `CleEtrGenreP`, `CleEtrNatureP`, `CleEtrCommune`, `CleEtrCanton`, `CleEtrDefP`) values ('8', 't', 't', '1', '11', '31', '1', '');[br] )[br][br] [var] => [br] )[br][br])[br][br][/pre]
I would like to save the [CleEtrDef] as [CleEtrDefP], but in my db_save, when i'm trying to save it like this
β
CleEtrDefP:{var:read_data9} it just return me array as value. Not (in this case) 9[br]
[br]Array[br]([br] [page] => Chronoforms6[br] [cont] => manager[br] [chronoform] => modif_mot_unique[br] [event] => submit[br] [Model1] => Array[br] ([br] [CleEtrMotFrP] => 8[br] [Traduction] => t[br] [Contexte] => t[br] [CleEtrGenreP] => 1[br] [CleEtrNatureP] => 11[br] [CleEtrCommune] => 31[br] [CleEtrCanton] => 1[br] [CleEtrDefP] =>[br] )[br][br] [button12] => [br])[br][br]Array[br]([br] [validate_fields2] => Array[br] ([br] [log] => Automatic validation enabled.[br] [var] => 1[br] )[br][br] [read_data9] => Array[br] ([br] [log] => Array[br] ([br] [0] => SELECT `Data9`.`CleEtrDef` AS `Data9.CleEtrDef` FROM `t_mot_francais` AS `Data9` WHERE `Data9`.`id` = '8' LIMIT 100;[br] )[br][br] [var] => Array[br] ([br] [0] => Array[br] ([br] [Data9] => Array[br] ([br] [CleEtrDef] => 9[br] )[br][br] )[br][br] )[br][br] )[br][br] [save_data10] => Array[br] ([br] [data] => Array[br] ([br] [CleEtrMotFrP] => 8[br] [Traduction] => t[br] [Contexte] => t[br] [CleEtrGenreP] => 1[br] [CleEtrNatureP] => 11[br] [CleEtrCommune] => 31[br] [CleEtrCanton] => 1[br] [CleEtrDefP] =>[br] )[br][br] [_error] => Error saving the data.[br] [log] => Array[br] ([br] [0] => INSERT INTO `t_trad_patois` (`CleEtrMotFrP`, `Traduction`, `Contexte`, `CleEtrGenreP`, `CleEtrNatureP`, `CleEtrCommune`, `CleEtrCanton`, `CleEtrDefP`) values ('8', 't', 't', '1', '11', '31', '1', '');[br] )[br][br] [var] => [br] )[br][br])[br][br][/pre]
I would like to save the [CleEtrDef] as [CleEtrDefP], but in my db_save, when i'm trying to save it like this
β
CleEtrDefP:{var:read_data9} it just return me array as value. Not (in this case) 9[br]
Hi gebonimo,
β
In the "Data override on save" of the "Save data", use this:
β
In the "Data override on save" of the "Save data", use this:
CleEtrDefP:{var:read_data9.Data9.CleEtrDef}Best regards
I did try it, and there is the debugger :
β[pre]
Array
([br] [page] => Chronoforms6[br] [cont] => manager[br] [chronoform] => modif_mot_unique[br] [event] => submit[br] [Model1] => Array[br] ([br] [CleEtrMotFrP] => 8[br] [Traduction] => fgdf[br] [Contexte] => dfgdfgdsf[br] [CleEtrGenreP] => 1[br] [CleEtrNatureP] => 12[br] [CleEtrCommune] => 273[br] [CleEtrCanton] => 46[br] )[br][br] [button12] => [br])[br][br]Array[br]([br] [validate_fields2] => Array[br] ([br] [log] => Automatic validation enabled.[br] [var] => 1[br] )[br][br] [read_data9] => Array[br] ([br] [log] => Array[br] ([br] [0] => SELECT `Data9`.`CleEtrDef` AS `Data9.CleEtrDef` FROM `t_mot_francais` AS `Data9` WHERE `Data9`.`id` = '8' LIMIT 100;[br] )[br][br] [var] => Array[br] ([br] [0] => Array[br] ([br] [Data9] => Array[br] ([br] [CleEtrDef] => 9[br] )[br][br] )[br][br] )[br][br] )[br][br] [save_data10] => Array[br] ([br] [data] => Array[br] ([br] [CleEtrMotFrP] => 8[br] [Traduction] => fgdf[br] [Contexte] => dfgdfgdsf[br] [CleEtrGenreP] => 1[br] [CleEtrNatureP] => 12[br] [CleEtrCommune] => 273[br] [CleEtrCanton] => 46[br] [CleEtrDefP] => [br] )[br][br] [_error] => Error saving the data.[br] [log] => Array[br] ([br] [0] => INSERT INTO `t_trad_patois` (`CleEtrMotFrP`, `Traduction`, `Contexte`, `CleEtrGenreP`, `CleEtrNatureP`, `CleEtrCommune`, `CleEtrCanton`, `CleEtrDefP`) values ('8', 'fgdf', 'dfgdfgdsf', '1', '12', '273', '46', '');[br] )[br][br] [var] => [br] )[br][br])[br][br][/pre]
[br]Here my save_data10 :
β
[br]Don't understand why it is not working... That's why i was thinking about the hidden field. I'm searching a solution since 3 daysπ [br]
β[pre]
Array
([br] [page] => Chronoforms6[br] [cont] => manager[br] [chronoform] => modif_mot_unique[br] [event] => submit[br] [Model1] => Array[br] ([br] [CleEtrMotFrP] => 8[br] [Traduction] => fgdf[br] [Contexte] => dfgdfgdsf[br] [CleEtrGenreP] => 1[br] [CleEtrNatureP] => 12[br] [CleEtrCommune] => 273[br] [CleEtrCanton] => 46[br] )[br][br] [button12] => [br])[br][br]Array[br]([br] [validate_fields2] => Array[br] ([br] [log] => Automatic validation enabled.[br] [var] => 1[br] )[br][br] [read_data9] => Array[br] ([br] [log] => Array[br] ([br] [0] => SELECT `Data9`.`CleEtrDef` AS `Data9.CleEtrDef` FROM `t_mot_francais` AS `Data9` WHERE `Data9`.`id` = '8' LIMIT 100;[br] )[br][br] [var] => Array[br] ([br] [0] => Array[br] ([br] [Data9] => Array[br] ([br] [CleEtrDef] => 9[br] )[br][br] )[br][br] )[br][br] )[br][br] [save_data10] => Array[br] ([br] [data] => Array[br] ([br] [CleEtrMotFrP] => 8[br] [Traduction] => fgdf[br] [Contexte] => dfgdfgdsf[br] [CleEtrGenreP] => 1[br] [CleEtrNatureP] => 12[br] [CleEtrCommune] => 273[br] [CleEtrCanton] => 46[br] [CleEtrDefP] => [br] )[br][br] [_error] => Error saving the data.[br] [log] => Array[br] ([br] [0] => INSERT INTO `t_trad_patois` (`CleEtrMotFrP`, `Traduction`, `Contexte`, `CleEtrGenreP`, `CleEtrNatureP`, `CleEtrCommune`, `CleEtrCanton`, `CleEtrDefP`) values ('8', 'fgdf', 'dfgdfgdsf', '1', '12', '273', '46', '');[br] )[br][br] [var] => [br] )[br][br])[br][br][/pre]
[br]Here my save_data10 :
β

Your read data returns multiple results, so a 0 must be added BEFORE the Data9:
β
Best regards
CleEtrDefP:{var:read_data9.0.Data9.CleEtrDef}OR, set the "Select type" in the "Read data" to "First matching" and do not change anything else.π
β
Best regards
This topic is locked and no more replies can be posted.