Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Assign label names to table column headers from xls file

Hi everyone,

I've been searching for a solution to automate the naming of table header columns with label names from an XML file or in an alternative way, if this is possible.

What I have is an XML-file that looks similar to this. (Although with approx. 1000 rows)

variablelabel.PNG

From the table box the list of available fields has all the names from column 3 e.g "JAJA_ORG.PRODUCTYN" etc.

I add this to the list of 'Fields Displayed in Tablebox' and I now want to rename all the different fieldnames, to the text from column one.

Is this possible trough an expression in the Label section, or is there a workaround to make this possible?

Thank you.

/Daud

2 Replies
awhitfield
Partner - Champion
Partner - Champion

aud,

can you upload an example QVW and .xls please?

Andy

ogster1974
Partner - Master II
Partner - Master II

I've done something similar to solve 2 problems.

1. Clients want to use their own terminology but the same base dashboard

2. Sometimes text needs to be localised to the users preferred language.

For general text, titles, subtitles etc... I use the following.

A text table that contains

TextKey AS %TextKey,

"LanguageId" AS %LangKey,

"Text"

Like you have.

then in the label I insert the relevant sub key.

If(count({1<[%LangKey]=P([%LangKey]),%TextKey={'Audit Failure Rate'}>} [Text])<>1,

'Audit Failure Rate',

Aggr(Only({1<[%LangKey]=P([%LangKey]),%TextKey={'Audit Failure Rate'}>} [Text]), [Text]))

this assumes I have a filter for language selection and as users can have multiple languages selected.  I have a check for no text and multiple selection then goes to the text table for content based on a sub key.

This works for me.  The only issue I have is Sense hasn't made all its Labels changeable by expression yet so abit hit and miss with application.

Regards

Andy