Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
Is there anyway to select multi-data by a given data list?
[Data table]
Simple two-column table with 10000 record:
----------------------------------
ProductID Price
CTSB214493 100
CTSB214497 200
...
CTSG214207 108
----------------------------------
[Products I want to select]
A list with 500 product IDs:
CLYG214407
CLYG214409
...
CQFB214435
[Function that I want]
I want to copy these 500 product IDs in some where in QV worksheet (text field? input field?) and the field "ProductID" will automatically be select and then I can get the price list.
How can I do it?
Many thanks!
Yuan
Hi
- Import this list as an excel file with a flag of 'Price list'
- Connect this to the other table you have
- filter the table using the flag 'Pricelist'
Thanks
Padma
Hi,
Look at the attached application.
It might help you.
Regards
ASHFAQ
Hi Padma,
Thank you for your reply!
Here I post some detail of how I solve this problem.
As you mentioned, I imported this 500 IDs by a text file and load the data TWICE like this:
Selected_IDs:
LOAD
@1 as "ProductID",
@1 as "ProductID_Select"
FROM
(txt, codepage is 936, no labels, delimiter is '\t', msq, no eof);
The "ProductID" column links the original table with 10000 records.
Then, I added the "ProductID_Select" column as a filter in my worksheet.
Next, I chose the "Select ALL" in the filter menu, everything is done!
Please kindly tell me if there is any other easier ways.
Thank you!
Yuan
Thank you ASHFAQ!
I am sorry I only have a free edition currently, would you please paste a snapshot or script?
Yuan
Hi,
looks like the solution proposed by Ashfaq Mohammed is the correct answer and exactly what you are looking for:
='(' & Replace(Replace(Replace(Trim('$(vCustomerList)'), ' ', '|'),' ', '|'), chr(10), '|') & ')'
=''
hope this helps
regards
Marco
Thank you, Ashfaq. It works now!
Thank you Macro, it works perfect!
Next, I want to add a button like "Choose the ID".
First thing, I imported these IDs by a text file and named it "MyIDs".
ImportedIDs:
LOAD
@1 as "MyIDs"
FROM
(txt, codepage is 936, no labels, delimiter is '\t', msq, no eof);
And then I built a button and added an "Action" exactly like Ashfaq Mohammed did in his file.
The question is, how can I use a field's value/lists in this expression?
Ashfaq' expression
='(' & Replace(Replace(Replace(Trim('$(vCustomerList)'), ' ', '|'),' ', '|'), chr(10), '|') & ')'
My expression which does not work.
='(' & Replace(Replace(Replace(Trim('([MyIDs])'), ' ', '|'),' ', '|'), chr(10), '|') & ')'