Skip to Content
avatar image
Former Member

Inserting nulldate

This one has me a bit perplexed.

Part 1:

I have a transaction that produces an xml doc with two date columns among other things (start and finish). When there is no date/time in these columns they display as 'TimeUnavailable' when executed from workbench. However occasionally the start and finish dates for a row will appear as the current date and time, even though the BLS has assigned nothing to these fields.

Part 2: 'Bailing on trying to fix part 1, moving onto brute force'

I have done much tracing attempting to find the source of these dates, to no avail. So I decided to break out the hammer and use a repeater at the end of the transaction, and set any start or finish date to nulldate where there was no process order (indicating no dates/times required). This almost worked, it got rid of all unwanted dates, except those in the first row. I even went so far as to remove any conditional logic and assign nulldate to all date fields in the document (as a test). Still the current date/time remain in any fields in the first row. If I assign some other date to the fields, they will reflect the date/time I have assigned.

In case you're wondering why I would want to display a row with no process order, it is part of a Lean Rhythm wheel display that shows a fixed list of products for manufacture on a production line. Sometimes products are skipped if inventory levels haven't triggered a production run, thus no process order.

Any Ideas would be appreciated.

Regards,

Rod Hoffman

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jul 16, 2008 at 05:19 AM

    Hi,

    You can do one thing.

    In repeater u have to put conditional block to check the each process order is available or not. If there is no process order for a particular row, call a assignment block, convert the strat and finish date to strings and set those values to "Time Unavailable."

    So u can display the empty Process Order row with Start and Finish date values as "Time Unavailable"

    Regards,

    Suresh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Rod,

      I ran into a similar kind of situation.

      The simplest solution I found was to write an XSLT to transform the xml output and replace 'TimeUnavailable' string of any datetime type of column with a blank.

      Hope it helps.

  • avatar image
    Former Member
    Jul 16, 2008 at 03:14 AM

    Hi Rod,

    In your transaction, you write a condition to check if the start date and finish date is null.

    If it is null, then assign the start date to curretnt date.

    Hope this will help you.

    Thanks,

    Manisha

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2013 at 02:18 AM

    With a conditional

    datefromxmlformat(repeater.Results{/Rowsets/Rowset/Row/START_TIME}, "yyyy-MM-dd") != ""

    Add comment
    10|10000 characters needed characters exceeded