Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Showing mapped values on a List Box

My script gets information from a SAP BW query as source.

I'm trying to "translate" the content of a field (it returns two values) to exhibit on a List Box to let it more familia to the end user.

On my load script i have something like this:



Map1:
mapping load * inline [
BR Biogene Sales, Pioneer
BR Pioneer Sales, Biogene
] ;

On the list box i created an expression on the Field input like this:

=ApplyMap("Map1", Sales Organization - Sales Organization Level 01 - [40SALESORG])

The List Box does no show me the values returned by this expression. Anyone has a clue on how to solve it?

Is there another option?

Thanks,

Oscar

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Five problems that I see:

  • Mapping tables are discarded by QlikView at the end of the load. The applymap() function must be used DURING the load. So wherever you're loading your field, use the applymap to load a different field.
  • Even though it's a mapping table and the field names don't matter, you must still give it field names because that's how inline loads work.
  • When you specify the table name in the applymap() function, it should be in single quotes, not double quotes.
  • When you specify the field name in the applymap() function, it should be in double quotes (they can be omitted if the field has no whitespace).
  • Since brackets are used by QlikView to specify fields or tables, I didn't think you could use them in a field name. Even if QlikView lets you, I'd file this under "bad idea".

Putting it all together, you'd do something like this

Map1:
MAPPING LOAD * INLINE [
A, B
BR Biogene Sales, Biogene
BR Pioneer Sales, Pioneer
];

LOAD
...
,SomeField as "Sales Organization - Sales Organization Level 01 - 40SALESORG"
,applymap('Map1',"SomeField") as "Mapped Sales Organization"
...
from your data source
;

And then just use "Mapped Sales Organization" in your list box rather than an expression.

View solution in original post

2 Replies
johnw
Champion III
Champion III

Five problems that I see:

  • Mapping tables are discarded by QlikView at the end of the load. The applymap() function must be used DURING the load. So wherever you're loading your field, use the applymap to load a different field.
  • Even though it's a mapping table and the field names don't matter, you must still give it field names because that's how inline loads work.
  • When you specify the table name in the applymap() function, it should be in single quotes, not double quotes.
  • When you specify the field name in the applymap() function, it should be in double quotes (they can be omitted if the field has no whitespace).
  • Since brackets are used by QlikView to specify fields or tables, I didn't think you could use them in a field name. Even if QlikView lets you, I'd file this under "bad idea".

Putting it all together, you'd do something like this

Map1:
MAPPING LOAD * INLINE [
A, B
BR Biogene Sales, Biogene
BR Pioneer Sales, Pioneer
];

LOAD
...
,SomeField as "Sales Organization - Sales Organization Level 01 - 40SALESORG"
,applymap('Map1',"SomeField") as "Mapped Sales Organization"
...
from your data source
;

And then just use "Mapped Sales Organization" in your list box rather than an expression.

Not applicable
Author

Very good John.

It worked.

Thanks.

Oscar