Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can we do something like this in the same field in a table?
MyTable:
Load * Inline [
MyField
A
B
C
D
E
F
G
];
NoConcatenate
Load
If(Match(MyField, 'A','B','C'), 'HH',
If(Match(MyField, 'A'), 'A',
If(Match(MyField, 'B'), 'B',
If(Match(MyField, 'C'), 'C',
If(Match(MyField, 'D'), 'D',
If(Match(MyField, 'E'), 'E',
If(Match(MyField, 'F'), 'F',
If(Match(MyField, 'G'), 'G')))))))) as MyField2
;
Resident MyTable;
Drop Table MyTable;
The output table should look like this:
MyField2 |
A |
B |
C |
D |
E |
F |
G |
HH |
Would something like this do what you need? I moved the 'HH' as the "ELSE" portion of the last if statement so that if the value in MyField was not found in any defined match statements, it would return the 'HH' value.
Also, I added X,Y,Z to your inline list to test to verify they all displayed HH in the result. I had to include MyField in the reload in order to show all output rows in the app sheet (otherwise the output of just MyField2 would only have 1 row showing 'HH' because the app shows distinct values in a table.
I'm not 100% sure i'm understanding what you need, but wanted to share this in case it is what you need.
MyTable:
Load * Inline [
MyField
A
B
C
D
E
F
G
X
Y
Z
];
NoConcatenate
Load
MyField,
If(Match(MyField, 'A'), 'A',
If(Match(MyField, 'B'), 'B',
If(Match(MyField, 'C'), 'C',
If(Match(MyField, 'D'), 'D',
If(Match(MyField, 'E'), 'E',
If(Match(MyField, 'F'), 'F',
If(Match(MyField, 'G'), 'G',
'HH'))))))) as MyField2
Resident MyTable;
Drop Table MyTable;
Output here: