Alpha Video Training
Results 1 to 7 of 7

Thread: isdate(date_field) - in show/hide expression

  1. #1
    Member
    Real Name
    Bill
    Join Date
    Jan 2009
    Posts
    182

    Default isdate(date_field) - in show/hide expression

    Hello,

    I'm having one heck of a hair-puller...

    I've got a DATE field called "Visited_On" in my dbf table that is working fine...
    Capture_07 Mar. 02 19.17.jpg

    Dates are being stored and retrieved correctly...
    Capture_08 Mar. 02 19.22.jpg

    I'm attempting to make a checkbox appear/disappear with show/hide expression that is based on whether "Visited_on" date field has a date, or is blank.

    I believe I've tried everything.
    isdate(Visited_on) doesn't seem to work.
    I get an error when "Working Preview"
    Capture_09 Mar. 02 19.25.jpg

    I've also tried ISNOTBLANK(Visited_On) gives same error
    ISBLANK(Visited_On) same error
    ISDIGIT(Visited_On) same error...

    There must be something I'm not seeing that is obvious, as I don't see anyone else with the same error (I searched the forum thoroughly!!!)

    Any comments or suggestions would be appreciated!!
    Thanks,
    Bill

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: isdate(date_field) - in show/hide expression

    is_date() doesn't take a date value as its parameter, strangely enough. It takes a character representation of a date.

    ISDATE( Date_String as C )
    Date_String
    A character string that represents a date.

    Try

    is_date(dtoc(ted_On))

  3. #3
    Member
    Real Name
    Bill
    Join Date
    Jan 2009
    Posts
    182

    Default Re: isdate(date_field) - in show/hide expression

    Thank you Stan,

    I've tried what you suggest...

    Unfortunately I get a script error the instant I try the "Working View", and same error when I "save".
    Capture_11 Mar. 03 22.38.jpg

    Any other ideas? I really don't care if it's a date... (I validate the info before it gets added somewhere else), so even to test if the date box has ANYTHING in it would suffice in this case. Can't get ISBLANK or ISNOTBLANK to function either... very strange...

    Hopefully you can tell something from the script error that pops up. I can confirm that when the ISDATE(DTOC(Visited_On)) is removed, the component compiles and executes without errors.

    Thanks!
    Bill

  4. #4
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: isdate(date_field) - in show/hide expression

    Bill
    to your first question
    A blank date is 2455991 days behind today's date
    You might just need to use date()-visited_on<100000
    or
    visited_on>{01/01/0001}

  5. #5
    Member
    Real Name
    Bill
    Join Date
    Jan 2009
    Posts
    182

    Default Re: isdate(date_field) - in show/hide expression

    Thanks Ray,

    visited_on>{01/01/0001} did the trick!


    Thanks !
    Bill

  6. #6
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: isdate(date_field) - in show/hide expression

    Was there a reason you posted a web application question in the desktop section?
    Last edited by Al Buchholz; 03-04-2012 at 03:17 PM. Reason: thread moved to app server thread.

  7. #7
    Member
    Real Name
    Bill
    Join Date
    Jan 2009
    Posts
    182

    Default Re: isdate(date_field) - in show/hide expression

    Hi Stan,

    There was no reason... It was accidental. Sorry about that, I didn't notice till after it was posted, and there doesn't seem to be a way to delete messages.

    Thanks,
    Bill

Similar Threads

  1. client side show/hide expression to show object when row is dirty
    By Selwyn Rabins in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 10-22-2012, 01:41 PM
  2. Hide Help Icon when expression is entered in show/hide property.
    By leetv in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 05-31-2011, 01:26 PM
  3. Show/hide expression
    By Kzin in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 01-17-2011, 10:56 AM
  4. Show Hide Expression help?
    By bhaub in forum Application Server Version 10 - Web/Browser Applications
    Replies: 9
    Last Post: 04-07-2010, 07:52 PM
  5. Show/Hide Expression
    By cavj1 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 16
    Last Post: 01-18-2010, 05:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •