nblgeoweb VIP
Total posts: 178
22 Jun 2016 19:03

I have a situation where I have a status field and a date field (completion date) that are being used to track progress of some tasks. When the user sets the status to "Completed" (Status 5), I'd like to have the current date written into the date field automatically. I was thinking maybe I could use the SQL Action for Status 5 to write the date into #__js_res_record_values. Is that the best way to do it or is there a better approach?

Last Modified: 29 Jun 2016


Sackgesicht VIP
Total posts: 1,636
23 Jun 2016 01:57

Actually it is not the best way, since it changes the value only in the #__js_res_record_values table but not in the #__js_res_record, which holds all field values and additional the values for text search. Check the api documentation on record update

See also the change field value example in the documentation page


Sergey
Total posts: 13,748
23 Jun 2016 04:31

I could suggect to use expiration date of article as complited and created date of article as started. This way you can easely alter it.


nblgeoweb VIP
Total posts: 178
23 Jun 2016 09:11

Many thanks for the feedback from both of you. Good ideas. Are the field values stored in #__js_res_record only for text search?


Sergey
Total posts: 13,748
29 Jun 2016 04:00

nblgeoweb Are the field values stored in #__js_res_record only for text search?

Yes it is FULLTEXT index for text search.

Powered by Cobalt