D3 and mvBase

 View Only

 SS Spreadsheet connective choking on date in compound Item ID

Vincent Elliott's profile image
Vincent Elliott posted 05-27-2021 11:57
Hi All,
Given an item ID such as 001000885$25BIW06GN-1$16407 and a dictionary item such as:

001 S
002 0
003 MONTH
004
005
006
007 A;0(G2$1]DMA]T1,3):"-":0(G2$1]DY)
008 G2$1
009 R
010 8

A LIST or SORT on the dictionary item returns the correct value "Dec-2012".  However, when this same dictionary item is passed to the SS connective as in LIST ... SS MONTH "01/01/2012" "31/12/2012"  UNITS ..., the value returned is garbage as in "-"  and the totals a single column of all zeroes (we use European date format).

Have I structured the dictionary item incorrectly or is there a bug in the SS handling of the dictionary item?

Vincent
Brian Cram's profile image
ROCKETEER Brian Cram
I know nothing of SS, but I'd be willing to guess that A7 is not being used. Try replacing A8 with the content of A7 and leave A7 blank. The simple analogy about conversions and correlatives I've used in the past is:

Correlative: "this is what I am"
Conversion: "this is what I look like"
Walter Kiess's profile image
Walter Kiess
I'm no DICT Guru, correlatives and conversions give me a headache...and I've never used SS.
I've been taught that a conversion is used to display the data in a format you want to see whereas a correlative is used to convert the data into a format you want to use for selections.
I've recently had a similar case where I thought I had to use A8 to extract the data from the attrib before applying the conversion, but that wasn't the case. Even though it worked when doing a plain old LIST, when I used it in another formula it didn't work. It seems the AQL preprocessor is too smart for its own good and works its special magic on the data so I don't have to. By including my own correlative I was confusing the AQL preprocessor thus yielding the incorrect result.
In your case, I'm wondering why you have G2$1 in A8? The conversion in A7 is applied to the data after the correlative is applied, but the conversion uses A0 instead of the result of the correlative, so the correlative becomes redundant. Try leaving A8 blank. If SS works on displayed data, then just A7 on its own should do the trick.
Brian Cram's profile image
ROCKETEER Brian Cram
Couldn't do it with one ADI, so here's three:

year
001 a
002 0
003 year
004
005
006
007
008 a;0(g2$1)(dy)
009 r
010 4

mo
001 a
002 0
003 mo
004
005
006
007
008 a;0(g2$1)(dm)(mr%2)
009 r
010 2

period
001 a
002 0
003 period
004
005
006
007
008 an(year):n(mo)
009 r
010 6
Bill Brutzman's profile image
Bill Brutzman
I find that doing these sorts of things in UniBasic is an easier way _ especially when multiple persons are involved.