klox7 VIP
Total posts: 914
09 Apr 2015 11:29

Hello,

I wanted to update specific field id with same value and I thought values are stored in js_res_record_values table. But nothing happened after change so I read somewhere that this table is only for searching. Is this true?

Then I checked js_res_records table and in fields there are cobalt field values. How can I change here specific field id with some other value for multiple records?

Regards

Last Modified: 22 Apr 2015


Sergey
Total posts: 13,748
22 Apr 2015 09:40

You get record fields column and convert to array

$array = json_decode($item->fields, TRUE);
$array[12] = 'new value';

$to_save = json_encode($array);

And then save this value. But befor you decode check that fields is string.

Powered by Cobalt