Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there any (automated) way of doing a load of fields with specific prefixes. I have a table (example Table A below) that is constantly modified and rather than have to add and removes fields every time it would be great screen the fields (as an example in Table B below where it would automatically only pull in fields beginning with MI):
For example:
Table A:
Load
MI Customer,
MI Region ,
MI Amount,
Sales,
Employee,
Budget
From Table_Source;
Table B:
Load
{only fields beginning in MI}
Resident Table A:
Yes, that's possible.
[Table A]:
LOAD * INLINE [
MI One, MI Two, MI Three, Four, Five
1,2,3,4,5
];
LET vFields = NoOfFields('Table A');
For j=1 to $(vFields)
LET vField = FieldName($(j),'Table A');
WHEN FindOneOf('$(vField)','MI') LET vFieldList = '$(vFieldList)' & ', ' & '[$(vField)]';
next
LET vFieldList = Mid('$(vFieldList)',2);
[Table B]:
LOAD
$(vFieldList)
RESIDENT
[Table A]
;
SET vFieldList=;
Yes, that's possible.
[Table A]:
LOAD * INLINE [
MI One, MI Two, MI Three, Four, Five
1,2,3,4,5
];
LET vFields = NoOfFields('Table A');
For j=1 to $(vFields)
LET vField = FieldName($(j),'Table A');
WHEN FindOneOf('$(vField)','MI') LET vFieldList = '$(vFieldList)' & ', ' & '[$(vField)]';
next
LET vFieldList = Mid('$(vFieldList)',2);
[Table B]:
LOAD
$(vFieldList)
RESIDENT
[Table A]
;
SET vFieldList=;
Thanks!!