Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Place holders for field names in UI

Hi all,

I'm building a new model which will have a filters section with 3 pre defined filter that belong to known fields in the Data scheme.

another 3 fields that will be used as filters are unknown at the beginning, and only if the customer maps his own fields into them in the the Database they will have values inside and will be shown.

The architecture will look like this:

Table1:

DateGenderbirthdayDim1Dim2dim3

And Dim1,Dim2,Dim3 are either used or not. If they are used, they will be mapped with values from other tables, and there will be a meta data table that will hold the name of the mapped field and whether it should be used in the UI, for example:

DimensionMappedtoUse
Dim1valueSegmentTrue

At the beginning the filters in the model will show only the Date, Gender and birthday, while dim1, dim2,dim3 will be hidden.

I have 2 questions:

1) How can I change the name of the filter of dim1 to ValueSegment automatically without getting inside the code?

2) How can I hide or un-hide the filters according to their mapping?

Thanks,

Kacevich Boris

4 Replies
MVP & Luminary
MVP & Luminary

Re: Place holders for field names in UI

Perhaps this document helps: Customisable Straight (and Pivot) Tables - more food for thought. It may no be exactly what you're asking for, but you can probably use the same technique to let your users select fields to use for filtering.


talk is cheap, supply exceeds demand
MVP
MVP

Re: Place holders for field names in UI

I assume you are talking about list boxes that show user defined fields to filter?

Just create a variable vDim that will hold the custom field name to filter, then use a field expression (Select <expression> from field drop down list on general tab) in your list box:

=$(='['& vDim &']')

To show / hide the listbox, use a show condition on layout tab:

=Len( '$(vDim)' )

Not applicable

Re: Place holders for field names in UI

Talking about multi Box, but how do I implement this in the script?

when I load the table I load:

table:

Load Date, Gender ,birthday, Dim1, Dim2, Dim3 from table.qvd;


metaData:

load Dimension, mapped, toUse from meta.qvd;


when Dim1 already holds the values of Valuesegment.

from this point how do I dynamically change the filter name of Dim1 in the multiBox to be Valuesegment and hide Dim2 and Dim3?

MVP
MVP

Re: Place holders for field names in UI

Not sure if I understand what you are trying to do.

You can create a MAPPING table MapFieldNames from your metaData, then

RENAME FIELDS using MapFieldNames;

Alternatively, create a logic as I shown above to just show Dim1, etc. in list boxes, use the mapped field names as Title in the list boxes and check the available mappings to enable conditional show / hide in list box properties.

I would need to check if and how you can dynamically disable single fields from a multi box.

In general, it's easier to understand your request and to create a possible soultion, if you could upload a small sample QVW.