Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Alias a field for input box

Dear all,

I have created a pivot table where the dimension is a group of fields in a drill down group and the group is called "Field"

The dimension in the pivot table is $(vField)

I have then created an input box which references the drill down group, so the end user can pick a field from a drop down list and the pivot table interacts with their selection

However in the script my fields are called things like IP_ADM_OP_LOS which makes total sense for it to be like this in my script, and must remain this way.  I do not want the user to see the field name like this, and I wish to alias it for the purposes of the input box, but there seems no obvious way to alias my fields in the input box so it still interacts with the pivot table

Does anyone have any ideas?

Kind regards

Helen

2 Replies
Anonymous
Not applicable

Hi Helen

Not sure if I've understood you correctly but could you not load each field twice and the second time use an alias and then use the alias's in your input box? For example in your load script:

load  IP_ADM_OP_LOS,

  IP_ADM_OP_LOS as "new fieldname for input box" etc

Kindest Regards

Brian

marcus_sommer

You could implement with a if-loop or pick(match()) a kind of mapping to the choice from the user. But I would rather use a small table for this, like:

fieldmapping:

Load * Inline [

UserField, DataModelField

Length Of Stay, IP_LOS_ADM

];


If the user choose "Length Of Stay" and you used $(=only(DataModelField)) as dimension.


But it's better to use only user-friendly fieldnames within the gui - if you want to avoid a lot of work to change your scripts and the names which you are accustomed with then you could change them as a last step before finishing your reload with a rename-statement: Change name of field in expression?


- Marcus