Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

Search all selected value in two fields and display the resultant value

Hi All,

I am having two tables Customers and Relations.

  • I have Cust_Id in customer table.

IP_ID_Num
100
200
300

  • I have Cust_Id and Relation ID in Relations table.

IP_ID_NumPRSL
100200
100300
200400
300

200

Association between these two tables is IP_ID_Num.

When we select 200 from IP_ID_NUM, I get to see 400 from PRSL.

But my requirement is when we select a value from IP_ID_NUM, I need to search for that value in both IP_ID_NUM and PRSL fields.

When I select 200 from  IP_ID_NUM, I need to see two rows.


1. IP_ID_NUM - 100 and PRSL - 200. (Because PRSL value is 200)

2. P_ID_NUM - 200 and PRSL - 400. (IP_ID_Num value is 200).


Can anyone please help me?


Thanks in advance!

1 Solution

Accepted Solutions
Digvijay_Singh

Script -

Customer:

LOAD IP_ID_Num

FROM

[..\..\..\..\..\..\Downloads\Customer Relation.xlsx]

(ooxml, embedded labels, table is Customers);


CustRel:

LOAD

RowNo() as RelID, //Created ID field

IP_ID_Num,

     PRSL

FROM

[..\..\..\..\..\..\Downloads\Customer Relation.xlsx]

(ooxml, embedded labels, table is Relation);


Capture.PNG

View solution in original post

13 Replies
Digvijay_Singh

Hi,

As you mentioned -

When I select 200 from  IP_ID_NUM, I need to see two rows.


1. IP_ID_NUM - 100 and PRSL - 200. (Because PRSL value is 200)

2. P_ID_NUM - 200 and PRSL - 400. (IP_ID_Num value is 200).


I feel it should select

3. P_ID_NUM - 300 and PRSL - 200. (Because PRSL value is 200).

Digvijay_Singh

See if this can help. I needed ID field in Relation table -

varunreddy
Creator III
Creator III
Author

Hi Digvijay,

Sorry, it should select 3 values. I need to see all the values of IP_ID_NUM where IP_ID_NUM or PRSL is 200.

1. IP_ID_NUM - 100 and PRSL - 200. (Because PRSL value is 200)

2. IP_ID_NUM - 200 and PRSL - 400. (IP_ID_Num value is 200).

3. IP_ID_NUM - 300 and PRSL - 200. (Because PRSL value is 200).


Is there a way to achieve?

varunreddy
Creator III
Creator III
Author

Did you try to attach any solution ?

Digvijay_Singh

Ya, I can see it attached? Are you not able to see QVW attached?

varunreddy
Creator III
Creator III
Author

No I cannot.  Can you please attach again?

Digvijay_Singh

Attaching qvw once again.

Digvijay_Singh

Now? I needed one extra ID field in relation table as Customer Id is repeating in relation table.

varunreddy
Creator III
Creator III
Author

I don't see it. Can you please explain me how you did it?