Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Is it possible to create a template and based on a combo box?

I will like to create some fields that will be autopopulated based on a combo box.

For example I will have the following fields:

Name:

Country:

Age:

ID:

Phone:

I will like to have the fields autopopulated based on a combo that may be the ID or name. Is that possible on QlikView? if so, can you please let me know how?

Thanks in advanced for your help.

1 Solution

Accepted Solutions
Not applicable
Author

Hello Roberto,

I've attached a qvw file for you. Everything is there

If you can't open it, because of personal license, here is how I did it step by step.

Script:

LOAD * INLINE [

    Name, Country, Age, ID, Phone

    Mark, Poland, 17, 1, 444444444

    Thomas, Poland, 5, 2, 888888888

    Luigi, Germany, 45, 3, 875412369

];

Drop down:

- It is a simple Multi box, with one Field added (ID)

Area with information:

- That is just a slightly modified text box, with below code pasted as its Text:

='ID: ' & ID &Chr(10)&

'Name: ' & Name&Chr(10)&

'Country: ' & Country&Chr(10)&

'Age: ' & Age&Chr(10)&

'Phone: ' & Phone&Chr(10)&

Hope it helps.

BR,

Kuba

View solution in original post

8 Replies
Not applicable
Author

Hello Roberto,

Please tell me if attached app is what you are looking for

Images:

1) First selection:

Screen Shot 07-27-16 at 08.59 PM.PNG

2) Second selection:

Screen Shot 07-27-16 at 08.59 PM 001.PNG

BR,

Kuba

Anonymous
Not applicable
Author

Yes, that is what I need, how do you do that? Please use as much details as you can.

Not applicable
Author

Hello Roberto,

I've attached a qvw file for you. Everything is there

If you can't open it, because of personal license, here is how I did it step by step.

Script:

LOAD * INLINE [

    Name, Country, Age, ID, Phone

    Mark, Poland, 17, 1, 444444444

    Thomas, Poland, 5, 2, 888888888

    Luigi, Germany, 45, 3, 875412369

];

Drop down:

- It is a simple Multi box, with one Field added (ID)

Area with information:

- That is just a slightly modified text box, with below code pasted as its Text:

='ID: ' & ID &Chr(10)&

'Name: ' & Name&Chr(10)&

'Country: ' & Country&Chr(10)&

'Age: ' & Age&Chr(10)&

'Phone: ' & Phone&Chr(10)&

Hope it helps.

BR,

Kuba

Anonymous
Not applicable
Author

Ok, great and thank you for your time. How does this works if the data comes from a database? what should change in the code?

Not applicable
Author

Data source does not matter (you must only make sure that values from database have same label)

So in general you would need to change script only (instead on inline load, create db connection string, and then data load from db)

If you do not know how to do it, please go here: QlikView 11 Developer Tutorial

Maybe start with this: https://www.youtube.com/watch?v=DTp7nrcI6G0

BR,

Kuba

Anonymous
Not applicable
Author

Great!!!!!, It's working as you said!!!!!

Now, if you have more than 1 record that share the same field as country, that you can add 2 text box with the same data based on country?

In your example you have Poland and Germany, if you select Poland how can I display the 2 options populated?

I mean that you will see:

ID: 1                                                                    ID:2

Name: mark                                                        Name: Thomas

Country: Poland                                                  Country: Poland

Age: 17                                                                Age: 5

Phone: 4444444                                                  Phone: 8888888

When the country filter is Poland

Not applicable
Author

Hey Roberto,

My initial solution assumes only 1 possibile Id selected at time, thus what you have described is not possible in my file.

Can you share the use case with me? Maybe we are overthinking it

Anonymous
Not applicable
Author

This is for a project that I am working, I just trying to figure it out if it's possible or not. I have an integration between SQL, Excel and Word, so my Excel will bring all the tickets by product that accomplish a query, then when I opened the word template it will display all the records in the template. If I only have 1 it will bring 1 template, if I have 2 it will bring 2 templates (in the same word file). I don't know how this was created.

So, In QlikView I will like to filter by Product and if there are 2 records then that one template will be filled out with the information from first record and the second one with the information of the second record.

As now, with the information that you provided I have already created a filter that will fill the template base on the selection, but I will like to know if display all the records for the same product will be possible.

Thanks in advanced for your help.