Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to use a function which treat all docnumbers as IC-Type, when a single item in a document number has the type IC.
For example I have this data:
Docnumber, Item, Type
1,1,IC
1,2,#N/A
1,3,3rd
2,1,#N/A
2,2,3rd
2,3,#N/A
Now all Items of Docnumber 1 should be treated as IC-Type, because one Item is equal to type IC.
Thanks!
KR
Joe
Hi,
maybe helpful:
tabDocItems:
LOAD * INLINE [
Docnumber, Item, Type
1, 1, IC
1, 2, #N/A
1, 3, 3rd
2, 1, #N/A
2, 2, 3rd
2, 3, #N/A
];
tabDocTypes:
LOAD Distinct
Docnumber,
Type as DocType
Resident tabDocItems;
Generic
LOAD Docnumber,
DocType,
'yes'
Resident tabDocTypes;
regards
Marco
May be create a new column where you assign IC to all the repeating Docnumber
Table:
LOAD * Inline [
Docnumber, Item, Type
1,1,IC
1,2,#N/A
1,3,3rd
2,1,#N/A
2,2,3rd
2,3,#N/A
];
Left Join (Table)
LOAD Docnumber,
'IC' as NewType
Resident Table
Where Type = 'IC';
Hi,
maybe helpful:
tabDocItems:
LOAD * INLINE [
Docnumber, Item, Type
1, 1, IC
1, 2, #N/A
1, 3, 3rd
2, 1, #N/A
2, 2, 3rd
2, 3, #N/A
];
tabDocTypes:
LOAD Distinct
Docnumber,
Type as DocType
Resident tabDocItems;
Generic
LOAD Docnumber,
DocType,
'yes'
Resident tabDocTypes;
regards
Marco
Thanks! It works now perfectly.
Hi Sunny!
This should also work, but I took the proposal from Marco.
Thanks for your effort!
Not a problem, as long as you get what you were looking for