
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply value wich is in the same column
Hi everyone ! I have an excel to import wich have two columns, one of those, have the code and the group and the other column has the description .
Like this :
CODE DESCRIPTION
EXAMPLE1 abcde
102030 abcde
10424 abcde
EXAMPLE2 skdfslk
11234 sdkf
32809 lsksj
94385 klajlkfj
I need to be finish like this :
CODE DESCRIPTION CODE_NAME
EXAMPLE1 abcde EXAMPLE1
102030 abcde EXAMPLE1
10424 abcde EXAMPLE1
EXAMPLE2 skdfslk EXAMPLE2
11234 sdkf EXAMPLE2
32809 lsksj EXAMPLE2
94385 klajlkfj EXAMPLE2
I 've already try to use for each like this :
for each a in FieldValueList('B')
LOAD if(WildMatch($(a),'CAPITULO*')>0,$(a)) as Capitulo AutoGenerate 2;
NEXT a
But it doesn't work
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Axel,
Assuming you have the 'Example 1' description as the first row in your table, you could try something like this:
fakedata:
load * Inline
[
CODE,DESCRIPTION
102030,abcde
EXAMPLE1,abcde
10424,abcde
EXAMPLE2,skdfslk
11234,sdkf
32809, lsksj
94385,klajlkfj
];
NoConcatenate
Load
RowNo() as Id,
CODE,
DESCRIPTION,
if (WildMatch(CODE,'EXAMPLE*'),CODE,peek(Teste)) as Teste
Resident fakedata;
drop table fakedata;
Since there's nothing to compare in the columns, I would assume you have some structure that the first row has the defining CODE, in this case 'Example 1'.
Attached the file I used.
Felipe.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Axel,
Assuming you have the 'Example 1' description as the first row in your table, you could try something like this:
fakedata:
load * Inline
[
CODE,DESCRIPTION
102030,abcde
EXAMPLE1,abcde
10424,abcde
EXAMPLE2,skdfslk
11234,sdkf
32809, lsksj
94385,klajlkfj
];
NoConcatenate
Load
RowNo() as Id,
CODE,
DESCRIPTION,
if (WildMatch(CODE,'EXAMPLE*'),CODE,peek(Teste)) as Teste
Resident fakedata;
drop table fakedata;
Since there's nothing to compare in the columns, I would assume you have some structure that the first row has the defining CODE, in this case 'Example 1'.
Attached the file I used.
Felipe.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wowww Felip !!!!! thank you so much !!! it worksss !
What about this "peek(teste)" .. what is "teste" ??


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Axel,
It just searches for the previous row in the table and gets the value.
The 'teste' is just the name of the field i've used, so it would look while loading the field 'Teste' for the previous 'Teste' value in the table.
Something like the below table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much !!
