Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

loveqliksense
New Contributor III

Dynamic Fields working in all Schema

Hi All,

I have  location ID starting from location ID 1 to Location ID 7 . For X Schema I  have to comment out location Id  5 to 7 , for schema Y, I have to comment Location ID5 to Location ID8 . How can we make work without commenting  in all schema?

Thanks in advance

15 Replies

Re: Dynamic Fields working in all Schema

You could add another field which grouped your [locaction ID] and is linked to it. Then a selection from this field would work.

- Marcus

loveqliksense
New Contributor III

Re: Dynamic Fields working in all Schema

How would I know which field grouped my location ID. I checked location table to which it belongs to.

ogster1974
Honored Contributor II

Re: Dynamic Fields working in all Schema

You could idendify the fields to load in a config file and load the fields to be used in first then load the data based on those fields. 

Regards

Andy

loveqliksense
New Contributor III

Re: Dynamic Fields working in all Schema

I did not understand. Could you please explain.

Thanks

Re: Dynamic Fields working in all Schema

It was meant that you create a new field for it either within your origin table or in a new mapping-like table, maybe in this way:

load * inline [

location ID, Group ID

1, X

2, X

...

];

- Marcus

loveqliksense
New Contributor III

Re: Dynamic Fields working in all Schema

oh that means if I create a inline table keeping all the location field , it will work. I will try it now.

loveqliksense
New Contributor III

Re: Dynamic Fields working in all Schema

Hey Marcus,

I have 4 schemas to make it work and location level is till 8.  Do you still think I can do this by inline load? Because script will be really long.

Right now I am trying for two schema. This is what I tried:

Load * Inline [

Location, All_Schema

Location_ID_01,X

Location_ID_02,X

Location_ID_03,X

Location_ID_04,X

Location_ID_05,X

Location_ID_06,X

Location_ID_07,X

Location_ID_08,X

Location_ID_01,Y

Location_ID_02,Y

Location_ID_03,Y

Location_ID_04,Y

Location_ID_05,Y

Location_ID_06,Y

Location_ID_07,Y

Location_ID_08,Y

];

I will try to reload the app in both schema and check if it throws no error.

Thanks

loveqliksense
New Contributor III

Re: Dynamic Fields working in all Schema

Hey Marcus,

I did the data load in X schema it shows location_ID_05 field not found while debugging. Though I have already added location_ID_05 in Inline load with X schema

Re: Dynamic Fields working in all Schema

The inline-table was just to show the idea. If there are rather many entries it would be easier just to do it within excel and then loading this excel or copying the result again into the inline-table.

- Marcus