Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loading Manual fields and connect

Dear Experts,

I need your help in the below task.

I have a field which is in the below format.

AAA1|AAA2|AAA3

AAA2|AAA1|AAA3|AAA4

AAA4|AAA3|AAA1

I want to create a manual field like below

AAA1

AAA2

AAA3

AAA4

and then when I select AAA1 it should select my original field.

Kindly help

Thanks & Regards

Jeba

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

No need for load inline.  If your have your OriginalField loaded form the database or any data source, only the seconf part is relevant.  The essence of the solution is the subfield() function which breaks the OriginalField intothe separate parts.

View solution in original post

8 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

like this

load * ,left(Field,4) as NewField;

LOAD * Inline

[

Field

AAA1|AAA2|AAA3

AAA2|AAA1|AAA3|AAA4

AAA4|AAA3|AAA1

];

Regards

ASHFAQ

Anonymous
Not applicable
Author

Jeba,

If I got your question right, this should work:

data:
load * inline [
OriginalField
AAA1|AAA2|AAA3
AAA2|AAA1|AAA3|AAA4
AAA4|AAA3|AAA1
];

New:
load distinct
OriginalField,
subfield(OriginalField, '|') as NewFeild
resident data;

Regards,

Michael

Anonymous
Not applicable
Author

Hi Ashfaq,

Thanks for the message.

However my field length is not fixed.The only delimiter is |

Also I have one more clarification in the Inline statement.

My database has many fields including the one which I want to filter.

still shall I use Inline?

Regards

Jeba

ashfaq_haseeb
Champion III
Champion III

Hi,

If it is not fixed, then use below code shown for NewField1.

load * ,left(Field,4) as NewField,

Left(Field, Index(Field, '|') - 1) as NewField1;

LOAD * Inline

[

Field

AAA1|AAA2|AAA3

AAA2|AAA1|AAA3|AAA4

AAA4|AAA3|AAA1

];

Yo can apply the same while loading from database.

Regards

ASHFAQ

Anonymous
Not applicable
Author

Hi Michael,

Thanks for the help.

Your logic is correct.Since I have many fields in my table do I need to write a separate inline statement exclusively for this field and also the fields are not fixed.It can be a any type of combination but we have a delimiter |

Actually this is separate requirement which I just received from my requestor.

I build everything properly,but matching this by a new field is where I struck up.

Kindly help

Thanks & Regards

Jeba

ashfaq_haseeb
Champion III
Champion III

Hi if you solution is what Michael suggest.

No need to worry about length.

you can create separate field while loading from database itself.

Regards

ASHFAQ

Anonymous
Not applicable
Author

No need for load inline.  If your have your OriginalField loaded form the database or any data source, only the seconf part is relevant.  The essence of the solution is the subfield() function which breaks the OriginalField intothe separate parts.

Anonymous
Not applicable
Author

Hi Michael,

Thanks a lot

It worked.

Thanks & Regards

Jeba