Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, all.
I want to select two columns' records at once. But I don't know how to achieve that.
For example, I have two columns, named 'Seller' and 'Buyer'. And I got some records like below:
Seller | Buyer |
---|---|
A | B |
A | C |
B | A |
C | D |
D | E |
E | A |
D | B |
Now, I want to have ONE list box or something, but just one, that can make me to select ABCDE. Then once I select A (or BCDE), the records that contain A (or BCDE) will be filterd and displayed, no matter it is in Seller or Buyer. The results will be like:
Seller | Buyer |
---|---|
A | B |
A | C |
B | A |
E | A |
Cause every list box needs a field to create, once I choose Seller as the field, it only shows Seller's records.
So, I want to choose one and select both. How can I make that? Hope I express myself clearly.
Many thanks!
In one way, you could create a dummy field with all possible values (from both buyer and seller fields) and setting trigger, like:
Note: You might not see all values from both fields selected unless they all are in possible selection state after one applied selection (that order could be set in trigger order)
Many thanks for your reply and help!!
But what if I have hundreds of records? Then it will be very trouble to enter them all in the inline table.
Hi,
Create a new variable called Buyer|Seller with value like A|B where A in a value of buyer and B is a value of seller.
This will create all list of buyer and seller combination.
If we want to select records containing A, then select A in search box for variable Buyer|Seller and we will get list of all combinations for which either buyer or seller is A.
This could be extended to any number of items.
Hi, thanks to your reply.
But can you go more specific? You mean create a new variable or a new field? And the combination is like just ABCDE or A|B, B|C? I tried but still cannot work.
Hi Rui,
just create a list box with calculated dimension
=Buyer&'|'&Seller and put the name of list box as you please.
now in the list box select A , it will show all options containing A.
That will contain list of all selections for Buyer and Seller combinations in which A is either buyer or seller.
Hello, Rui!
There will be helpful an Alter States and a field dynamicaly combined with both of your fields.
You may find this topic helpful:
You can just get them using simple load like:
Load Distinct
Seller as CommSel
From <>:
Load Distinct
Buyer as CommSel
From <>:
Hi, thanks to your reply.
Yes I did create a field combine the seller and buyer. But the new field is not linked to the seller or buyer. When I select from the new field, there is not reaction from the seller or buyer. How should I deal with this situation? Thanks
That is what I suggested/showed you creating a trigger for.