OnDemand User Group

Support Forums => Report Indexing => Topic started by: Justin Derrick on September 30, 2015, 06:47:11 AM

Title: arsload not handling character removal / defaults properly -- aka ARS1129E
Post by: Justin Derrick on September 30, 2015, 06:47:11 AM
Hey everyone.  :)

I'm indexing a report with a standardized header used for a dozen different report types.  The problem is, for a subset of those report types, one of the date fields isn't populated.  And that would normally be fine, but arsload doesn't appear to be using the default value I've specified, even when I feel it should be.

When the field is empty, and I don't do any character removal, I get:

Code: [Select]
ARS1129E Row 1: The string "        " could not be converted to a date from the format of %m/%d/%Y.
Fine.  It found some spaces where there should have been some numbers.  So I changed the Application configuration under the 'Load Information' tab to remove all leading, trailing, and embedded spaces.  So I run the report again, and I get:

Code: [Select]
ARS1129E Row 1: The string "" could not be converted to a date from the format of %m/%d/%Y.
So it's done the right thing in terms of character removal, resulting in a blank/null/zero-length value.  I would expect that when faced with a null value, that CMOD would substitute the default value, and load the data.  No such luck.

I'm kinda out of ideas for this.  I was thinking of adding a field mask for the date value, but I suspect it would just cause indexing to fail immediately when it doesn't find data matching that mask.

Any assistance would be greatly appreciated, as always.

-JD.
Title: Re: arsload not handling character removal / defaults properly -- aka ARS1129E
Post by: Greg Ira on September 30, 2015, 10:47:36 AM
What I've done in those cases is use a trigger on that field.  Use one of the "/" for the trigger.  Then I tie the field to that trigger.  CMOD will use the default when it can't find the trigger but not when the field is formatted wrong.
Title: Re: arsload not handling character removal / defaults properly -- aka ARS1129E
Post by: Justin Derrick on October 01, 2015, 03:04:02 AM
Use one of the "/" for the trigger.  Then I tie the field to that trigger.

The snag is that the date format provided in the report is 12311999 (MMDDYYYY) without slashes.  I suppose I might be able to trigger off the '20' in the year... 

Am I wrong in thinking that character removal resulting in a null should use the default value is the 'more correct' behavior?

-JD.
Title: Re: arsload not handling character removal / defaults properly -- aka ARS1129E
Post by: Greg Ira on October 01, 2015, 06:11:11 AM
Definitely agree.   If there's nothing there it should take a default instead of making us go through these contortions.
Title: Re: arsload not handling character removal / defaults properly -- aka ARS1129E
Post by: Greg Ira on October 01, 2015, 06:21:16 AM
Just a thought.  If you're on MP maybe you could use a regular expression in the trigger to catch (or not catch) the date: REGEX=’[0-9]{8}’ ?
Title: Re: arsload not handling character removal / defaults properly -- aka ARS1129E
Post by: Justin Derrick on November 27, 2015, 07:07:28 AM
This came up again today, and I like your RegEx idea.  I'll give it a shot and report back.

-JD.
Title: Re: arsload not handling character removal / defaults properly -- aka ARS1129E
Post by: Justin Derrick on November 27, 2015, 12:03:03 PM
Annnnnnd...  Regex support is only available in CMOD v9.5 and newer.  Doh.

So I'll keep digging.

-JD.