[CLOSED]Senior Moment - Need to create filler records
We are trying to create blank values for an excel that will be saved in a template. We limit the users to ten product attributes. The issue is creating blanks for the excel if the users decides to go with fewer than ten product attributes. (The template is an update from an existing version so these attributes cannot be appended to the end of the excel and copied over using VBA.)
[CODE -* &attribute_cnt is determined in the first read against the attribute tables -SET &REMAINDER = 10 - &ATTRIBUTE_CNT; TABLE FILE HOLDATTRIBS0 PRINT ATTRIBUTE_DESCFIELD_ABBR ATTRIBUTE_DESCFIELD_ABBR_MIN ATTRIBUTE_LINE BY ATTRIBUTE_ID WHERE ATTRIBUTE_ID LT 100 -* This hold file only allows valid attributes - nowhere near 100 ON TABLE SET HOLDLIST PRINTONLY ON TABLE SET ASNAMES ON ON TABLE HOLD AS HOLDATTRIBS1 END -* the code below attempts to create enough slots to fill out to 10 columns in the excel -* Unfortunately the number of records is not incrementing -SET COUNTER = 0; -REPEAT B_LOOPER2 &REMAINDER TIMES -SET &COUNTER = &COUNTER + 1; -SET &RECYCLE = &COUNTER; -SET &THIS_DATE_0 = &YYMD + 1; -SET &THIS_DATE = EDIT(&THIS_DATE_0,'9999/99/99'); DEFINE FILE HOLDATTRIBS1 NEW_DATE/A10 = '&THIS_DATE'; NEW_ATTRIBUTE_ID/I11 WITH ATTRIBUTE_ID = &RECYCLE + 100;
NEW_ATTRIBUTE_DESCFIELD_ABBR/A30 WITH ATTRIBUTE_ID = NEW_DATE | ' UPDATED' ; NEW_ATTRIBUTE_DESCFIELD_ABBR_MIN/A34 WITH ATTRIBUTE_ID = 'MIN.' | NEW_ATTRIBUTE_DESCFIELD_ABBR;
NEW_ATTRIBUTE_NAME_ABBR/A30 WITH ATTRIBUTE_ID = 'The date';
NEW_ATTRIBUTE_LINE/A66 = NEW_ATTRIBUTE_DESCFIELD_ABBR | ' AS ' | '''' | NEW_ATTRIBUTE_NAME_ABBR | ''''; END
TABLE FILE HOLDATTRIBS1 PRINT DST.NEW_ATTRIBUTE_DESCFIELD_ABBR AS ATTRIBUTE_DESCFIELD_ABBR OVER DST.NEW_ATTRIBUTE_DESCFIELD_ABBR_MIN AS ATTRIBUTE_DESCFIELD_ABBR_MIN OVER DST.NEW_ATTRIBUTE_LINE AS ATTRIBUTE_LINE OVER DST.NEW_ATTRIBUTE_ID BY ATTRIBUTE_ID ON TABLE SET HOLDLIST PRINTONLY ON TABLE SET ASNAMES ON ON TABLE HOLD AS HOLDATTRIBS2 END -B_LOOPER2 -RUN CODE] Clearly there is missing. Any thoughts are heartily encouraged.
Focus Nation Rocks!This message has been edited. Last edited by: S.J. Kadish,