Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Search for a CustID and get all records where SenderID or ReceiverID equals CustID

Hi all,

The idea is to search for a CustID and get all records where SenderID or ReceiverID equals CustID

My challenge is to create a field in a multibox, listbox or search object. The new field will filter the result shown in a application and should not restrict the fields that can be added to it (ad-hoc creation of tables).

Table1:

Column_1 stores SenderID

Column_2 stores ReceiverID

...

Column_n

Table2:

Column_1 stores CustID

...

Column_n

If there is a thread that resolves similar issue I would appreciate if someone could point me to it.

If not, is there an easy way to do it using the application/report objects? Or can it only be resolved in the script?

Kind Regards,
MateuszO

3 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

If SenderID and RecieverID conatins values from CustID, you can split your Table1 into 2, Send and Receive.

Make an alias for SenderID as CustID, and another alieas for ReceiveId as CustID.

This makes any selection/search on CustID to associate all records in your tables

Not applicable
Author

Thanx Jonathan for the suggestion.

Unfortunately the table is very large (more than 2 GB) thus making a second copy of the table would affect already poor performance.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The set would be:

  {<ReceiverID=p(CustID)> + <SenderID=p(CustID)>}


I assume you have some other field in Table 1 like "ID" that represents records. A listbox expression would be:

  =Aggr(Only({<ReceiverID=p(CustID)> + <SenderID=p(CustID)>}ID),ID)

-Rob

http://masterssummit.com

http://robwunderlich.com