I’m currently working on a solution to automatically update the Reminder Date of a content item when the item is created and/or each time it is updated. I’d like to update the date based on a user specified “reminder days” field in the content item. Here’s what i’ve done so far:
- Installed the PSOToolkit so that I have access to the PSODateAdjust extention.
- Setup an Input transformation on the sys_reminderdate field using the PSODateAdjust Extension using the “reminder days” field as a parameter (days).
This works fine when the “reminder days” field is set to a valid integer. However, when the reminder days field is set to an invalid value (e.g. “abcd”), and I attempt to update or insert the item, I get an error message. I have validation set for the “reminder days” field limiting its value to an integer in the range of 0-1000 but it appears that the transformation for the sys_reminderdate field occurs before the field validation for “reminder days” field. Does anyone know a way around this? Is it possible to get the field validation to occur before transformations? Thanks.
Jeff
Are you applying these at the item level or on the field level (“All Properties” on the content type vs “…” on the Edit Box) ?
Outside of enhancing the toolkit function to force a value of 0 if the field value is non numeric, a simple “brute force” method would be to make that field a drop down list populated by a keyword with the possible values.
-n
[QUOTE=jrobinson;21082]I’m currently working on a solution to automatically update the Reminder Date of a content item when the item is created and/or each time it is updated. I’d like to update the date based on a user specified “reminder days” field in the content item. Here’s what i’ve done so far:
- Installed the PSOToolkit so that I have access to the PSODateAdjust extention.
- Setup an Input transformation on the sys_reminderdate field using the PSODateAdjust Extension using the “reminder days” field as a parameter (days).
This works fine when the “reminder days” field is set to a valid integer. However, when the reminder days field is set to an invalid value (e.g. “abcd”), and I attempt to update or insert the item, I get an error message. I have validation set for the “reminder days” field limiting its value to an integer in the range of 0-1000 but it appears that the transformation for the sys_reminderdate field occurs before the field validation for “reminder days” field. Does anyone know a way around this? Is it possible to get the field validation to occur before transformations? Thanks.
Jeff[/QUOTE]
Nate,
I’m applying these at the field level not the item level. Looks like modifying the toolkit function may be the way to go. A dropdown with fixed options wouldn’t really be feasible as we’d need to include values in the range 0-365 at a minimum. Thanks.
Jeff
[QUOTE=natechadwick;21083]Are you applying these at the item level or on the field level (“All Properties” on the content type vs “…” on the Edit Box) ?
Outside of enhancing the toolkit function to force a value of 0 if the field value is non numeric, a simple “brute force” method would be to make that field a drop down list populated by a keyword with the possible values.
-n[/QUOTE]
It’s a simple change, but may take me a little bit to get to (Toolkit pull requests are always welcome!). Which version of CM System are you running?
-n
[QUOTE=jrobinson;21084]Nate,
I’m applying these at the field level not the item level. Looks like modifying the toolkit function may be the way to go. A dropdown with fixed options wouldn’t really be feasible as we’d need to include values in the range 0-365 at a minimum. Thanks.
Jeff[/QUOTE]