Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
validate a date field when set metadata
System
With MetaTagger, when using the <iw-home>/local/config/datacapture.cfg, FormAPI is not supported there. I have a date field:
<item name="Review Date">
<database data-type="DATE" data-format="yyyy-MM-dd" />
<label>Review Date<br/>(format: YYYY-mm-dd)</label>
<text required="n" maxlength="10" validation-regex="^[1-2][0-9][0-9][0-9]-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$">
<inline command="iwperl.exe d:/iw-home/custom/bin/inline_date.ipl" />
<cgi-callout url="/iw-bin/iw_cgi_wrapper.cgi/calendar_callout.ipl" label="Show Calendar" window-features="width=260,height=225,resizable=yes,toolbar=no,scrollbars=no,titlebar=no"/>
</text>
</item>
The calendar has business rules, such as not allowing user to choose a date that's earlier than today, etc. But user can bypass the calendar and enter any date in valid format directly into the text box. If I change it to "readonly", then the inline command for populating a default date is not supported.
Does anyone have a suggestion on how to allow both a default date and a calendar, also either force user to use only the calendar, or enable additional validation on the text field so that user can't bypass the business rules?
Thanks.
Find more posts tagged with
Comments
Migrateduser
We had a similar problem and we are not using MetaTagger (which is supposed to give more flexibility).
So we had to put the validations rules in a validation task that is part of submit workflow.
HTH
Migrateduser
Jane - I assume you are using MetaTagger 3.6 with TeamSite 6x. Please confirm.
Nikko
Migrateduser
Nikko,
Thanks for your response. Currently we are using MetaTagger 3.6 with TS 5.5.2. Moving into TS 6.x soon. Will TS 6.x make it easier?
Jane
Migrateduser
Thanks. Yes, we are aware that validation can be done in the workflow. But user experience will be different.
Migrateduser
That is not a supported configuration - with TS 552 you can not use MT 3.6 I don;t think. Can you confirm this is actually what you are doing? I am pretty sure that with TS6/MT3.6 you can do what you want.....
Migrateduser
Sorry. We are on TS 5.5.2, MT 3.5 moving to TS 6, MT 3.6 soon.
nickcolorado
Is it documented anywhere how to do a validation task for this? We have run into the same problem but do not have anyone with any real workflow development experience nor do we have the resources allocated to do the development at this time. Not having the date field validated has bit us time and time again! Thanks!
Migrateduser
You can add an External Task to your workflow, in this External Task call a .ipl script, say validate_date.ipl. Then write this validate_date.ipl script to extract the date field (an extended attribute on the file you submit with the workflow). Then check the date field against your business rules to determine if it is valid.
I don't know if there is Interwoven documentation about a validation task. But there is documentation about how to write an external task for sure.