• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Time field in form pulls full timestamp and more.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Time field in form pulls full timestamp and more.

    Hello,
    I have a data source that has a field defined as 'T - time'. It is formatted as HH:MM:SS. I created an app with an Editgrid and added a form for adds and edits. If I put this time field in a form, it makes it a pull down box that has 15 minute increments. If the value in the field doesn't match the increments, the box is blank. If I choose a time from the dropdown Ex. 19:45:00 and try to save the data, I get an error that the "time" field is invalid. When I put a debug on the RPG program the value coming from the form was "Tue Jan 01 2008 19:45:00 GMT-0500 (Eastern Standard Time)". I don't want the time field to be a pulldown, just validate that HH:MM:SS were keyed. I tried Rowediting on the editgrid and the time is treated correctly. Here is a screenshot of the form. image.png

    Rowedit on time fieldimage.png​
    ​​
    Attached Files

  • #2
    If you want to use the form and just have it treated as a text field then change your data source to return your timestamp as a character. You can then add validation against the form field with a regular expression. There is a valence assistant button with the regular expression option to create it for you.

    Comment

    Working...
    X