Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how can one create a dimension based on the field [DIFF.123] where one creates that field based on user selections (string concat)?
Or the user selects the field from a $Field listbox and the dimension of a chart is tied to that selection?
You can create a table with the field names with something like this:
// For all tables, get field names, put them in table called f_names, field called FName
for ii=1 to NoOfTables()-1 // -1 here because otherwise f_names table itself is included
for jj=1 to NoOfFields(TableName($(ii)) )
f_names:
LOAD FieldName($(jj),TableName($(ii))) as FName
Autogenerate 1;
next
next
If you only want FName values starting with DIFF you can put an if statement in the above code, or use the table to create a new one with only the FName values you want, or create a listbox and restrict the values in the listbox with an if statement.
Is this what you're looking for? -> Customizable Straight Table
It's close and I've implemented tables like that in the past. My problem is that I won't know ahead of time the names of the possible fields. Just every field loaded like 'DIFF.*'; so I can't precreate the dimensions and expressions in the chart. My specific case is that I want to set the dimension equal to something like [$(getfieldselections($Field))]; however, when I do this, I get an internal consistency error and QV crashes.
You can create a table with the field names with something like this:
// For all tables, get field names, put them in table called f_names, field called FName
for ii=1 to NoOfTables()-1 // -1 here because otherwise f_names table itself is included
for jj=1 to NoOfFields(TableName($(ii)) )
f_names:
LOAD FieldName($(jj),TableName($(ii))) as FName
Autogenerate 1;
next
next
If you only want FName values starting with DIFF you can put an if statement in the above code, or use the table to create a new one with only the FName values you want, or create a listbox and restrict the values in the listbox with an if statement.
Okay, so create an island is what it seems you are suggesting. I can easily do that, thx.