You are viewing limited content. For full access, please sign in.

Question

Question

Formatting Data Fields - Allowing for multiple formats

asked on May 7, 2014

I have several templates that all contain a date field. I know that I can restrict the format of the date field to a date format such as MM/DD/YYYY. However, this alone will not work. For this date field, we can have either a single date or a date range, which we want formatted MM/DD/YY - MM/DD/YY. How do I restrict this field to either one of these?

 

There is also a date description, such as document date, or policy year, which would indicate the format. I thought about using the add or remove fields to assign either the range or the single date fields, but that would not work until the template is filled out and they click "ok", so this would not work for filling out the template. Any suggestions on how I could accomplish this?

 

0 0

Replies

replied on May 7, 2014

Laserfiche doesn't have a date range data type so the only way to accommodate multiple dates is to have multiple fields. You could use a multi-value field, but that might get tricky when trying to represent a range. You could try both methods and figure out something that works. We've used date ranges before by adding a "Set End Date" Boolean field between the two of them. Then Workflow can know that it should try to do something with a second date.

0 0
replied on May 14, 2014

Thank you for mentioning workflow! I was trying to set something on the back end in the admin console to specify the formatting, but since there is no way to format the range that won't work.

 

So, I wrote a workflow to assign the proper formatted date. Based on the date description it is formatted as a single date or a range. Using regular expressions I separated out each range, based on before or after the dash, formatted them and then assigned that as the field value. Very roundabout way to achieve this.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.