Ask and answer questions about WebRatio, WebML and BPMN

Hello there,

I'm trying to use a create unit with YEAR datatype from MySQL, however I can only choose DATE as the type of the field.

I tried to use a "Validation Rule" with a format of YYYY, however when I use the form to enter data, it appears the message: "the entered value should have the format M/d/yy"

Also, when using DATE as the type of the field, a calendar of day/month/year appears.

Bottom line: I want to use a create unit with a year field only. Is that possible?

Thank you!

asked 17 Jan, 12:48

kAIOSHIN's gravatar image

kAIOSHIN
25135
accept rate: 0%


Hi,

at this moment the YEAR datatype from MySQL is not supported. However if you want to menage the years I suggest you to follow these alternatives:

  • Define the year Attribute as integer.
  • Or define a subtype "year" of Date type and set the yyyy as pattern.

Moreover if you consider the second alternative you can use the Calendar input and add the required validation Rule (i.e. a Regular Expression with (19|20) as value of the Expresssion Property).

In order to define subtypes you can refer to the steps described in the answer of this post: Format currency

Here you can find more details about the Validation Rules: The Validation Rule Framework

link

answered 25 Jan, 11:42

albertomolinaroli's gravatar image

albertomolin...
63424
accept rate: 62%

edited 25 Jan, 11:43

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1
×1

Asked: 17 Jan, 12:48

Seen: 203 times

Last updated: 25 Jan, 11:43

Related questions

©2001-2011 Web Models s.r.l. All rights reserved