Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm creating table using following
String_Positions:
LOAD * INLINE [
Change Number, StringNum, StringDesc
];
I've to assign values to field using following assignments
LET CHG_NUM = Peek('Change Number', $(i), 'AllCRs');
For one Change Number there can be multiple Apporval History information that I'm splitting from a field of previously loaded table and assigning it to following variables.
LET StringLen = $(EndPos) - $(BegPos) + 1;
LET StringDesc = Chr(39) & trim(Peek('Approval history', $(i), 'AllCRs')) & Chr(39);
LET StringDesc = Chr(39) & Mid(trim($(StringDesc)), $(BegPos), $(StringLen)) & Chr(39);
I've to insert above information into a table that I can use later for visualization.
Concatenate(String_Positions)
LOAD Distinct [Change Number], StringNum, StringDesc INLINE [ Change Number, StringNum, StringDesc
$(CHG_NUM) as Change Number,$(StringNum) as StringNum, $(StringDesc) as StringDesc];
I'm looping through for all records of AllCRs.
Issue I'm running into is that I'm getting improper assignment or NULL values into String Positions table. Please advise what is wrong here.
Thanks,
Vijay
Concatenate(String_Positions)
LOAD Distinct '$(CHG_NUM)' as [Change Number],
'$(StringNum)' as StringNum,
'$(StringDesc)' as StringDesc
autogenerate 1;
I don't think you need the inline load:
Concatenate(String_Positions)
LOAD Distinct $(CHG_NUM) as [Change Number],
$(StringNum) as StringNum,
$(StringDesc) as StringDesc
autogenerate 1;
I'm also guessing you already have a for loop around this since you're using $(i). You will need some kind of loop if you don't already have one.
You shouldn't use inline load here. Instead you should use a For Next loop, maybe the following:
For i = 0 to NoOfRows()
LET StringLen = $(EndPos) - $(BegPos) + 1;
LET StringDesc = Chr(39) & trim(Peek('Approval history', $(i), 'AllCRs')) & Chr(39);
LET StringDesc = Chr(39) & Mid(trim($(StringDesc)), $(BegPos), $(StringLen)) & Chr(39);
Load
Peek('Change Number', $(i), 'AllCRs'),
'$(StringNum)' as StringNum,
'$(StringDesc)' as StringDesc
Autogenerate 1;
Next i
HIC
everything is looking fine which filed you are getting null values?
Thanks for a prompt response.
I've used Autogenerate 1 as suggested but getting error. I'm attaching the screen shot.
Concatenate(String_Positions)
LOAD Distinct '$(CHG_NUM)' as [Change Number],
'$(StringNum)' as StringNum,
'$(StringDesc)' as StringDesc
autogenerate 1;
'$(CHG_NUM)' as [Change Number],
Hi Nicole,
I tried that and it also throws error. I'm attaching the screen shot.
Thanks,
Vijay
One more time:
Concatenate(String_Positions)
LOAD Distinct '$(CHG_NUM)' as [Change Number],
'$(StringNum)' as StringNum,
$(StringDesc) as StringDesc
autogenerate 1;
Hi,
It worked with following syntax.
Concatenate(String_Positions)
LOAD Distinct '$(CHG_NUM)' as [Change Number],
$(StringNum) as StringNum,
$(StringDesc) as StringDesc
autogenerate 1;
Now I'm getting value for Change Number from String Positions table but other two values are coming NULL even though at assignment time those variables have proper values.
Any ideas?
Thanks,
Vijay