Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Applymap()

Hi All,

ExceptionFieldNameMaping:

MAPPING LOAD

     CField,

     DisplayFieldLabel

FROM Tab;

Tab:

field 1,

field 2,

Apply map('ExceptionFieldNameMaping',FIELD_NAME)    as   Field name,

FROM Tab 2;

In applymap i have written mapping table name but i have n't mention field name which i have in mapping table.so based on this what it will return.

one more clarification

in applymap i need to mention Field name or field value from which i have in my mapping table.

Please help me out this issue.

Thanks in Advance.

reagrds

Prathap

5 Replies
Chanty4u
MVP
MVP

engishfaque
Specialist III
Specialist III

Dear Prathap,

Answer Scenario 1: No-matter either you are writing the same name in applymap or not which exist in Mapping Table, but the value must be same through which Mapping apply. The output field will be 2nd name of Mapping and when you rename field where you are using ApplyMap.

Answer Scenario 2: Please use field name for multiple values matching.

For more detail, kindly find attached sample.

Kind regards,

Ishfaque Ahmed

vikasmahajan

May be this

ExceptionFieldNameMaping:

MAPPING LOAD

     CField,

     DisplayFieldLabel

FROM Tab;

Tab:

field 1,

field 2,

Apply map('ExceptionFieldNameMaping',CField)    as   Field name,

FROM Tab 2;

HTH

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
tresesco
MVP
MVP

Ans1:

In mapping table there would be only two fields. The first field is matched against the input and the second field is mapped (output) based on the match from the first field. So the order of fields in mapping table matters, because qv is always going to compare the values from the first field, irrespective of it's name. So mentioning the name of fields in applymap is not necessary.

Ans2:

You can use the field value directly in the applymap, but in that case you would be able to mention one value only. Usually you would want all the values in the field to be mapped, so you use field name instead. That is, by mentioning the field name, you are actually mentioning the all field values.

Hope this helps.

Not applicable
Author

Hi,

try this expression.

ExceptionFieldNameMaping:

MAPPING LOAD

     CField,

     DisplayFieldLabel

FROM Tab;

Tab:

field 1,

field 2,

Apply map('ExceptionFieldNameMaping',CField,'NA')    as   Field name,

FROM Tab 2;