Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys,
I need one field named as "Products" listed below:
Products |
---|
Small |
Large |
Total |
And if Click on Small the it should show Small Products (A,B) only.
And if Click on Large then it should show Large Products (C,D,E)only,
And if Click on Total then it should show all the Products (A,B,C,D,E,F).
I have following field on all the product named as Link_Product
Link_Product |
---|
A |
B |
C |
D |
E |
F |
G |
Small Products are : A, B
Large Products are: C,D,E
Total Total Products are: A,B,C,D,E,F (Excluding G)
Kindly suggest.
I need to create the Products field in script (Back End)
Load the products in a way that associates the product types with the products:
LOAD *
Inline
[
Product, Type
A, Small
B, Small
C, Large
D, Large
E, Large
];
Total is the same as nothing selected, so you dont really need that. But if you insist on doing that, add
A, Total
B, Total
...
to the load above.
(The inline load is for example purposes - change the inline load to whatever source you are loading from)
Can you share sample qvw ?
Hi
Try like this
Test:
LOAD *, if(Match(Link_Product, 'A', 'B'), 'Small', if(Match(Link_Product, 'C', 'D', 'E'), 'Large')) AS Product Inline
[
Link_Product
A
B
C
D
E
F
G
];
Load Link_Product, if(not Match(Link_Product, 'G'), 'Total') AS Product Resident Test;
Please find the attached app and script
Product:
Load*,If(Match(Link_Product,'A','B'),'Small',If(Match(Link_Product,'C','D','E'),'Large')) as Size;
Load * Inline [
Link_Product
A
B
C
D
E
F
G];
Load Link_Product, if(not Match(Link_Product, 'G'), 'Total') AS Size Resident Product;
Hi Mahamed Khan, Mayil Vahanan Ramasamy's solution is working for me.
I have one field named as Link_Products which contains 7 values (A,B,C,D,E,F,G) and further i want to categories it
in Small (A, B) Large (C,D,E) and Total (A,B,C,D,E,F) and this three categories should be in single field named as Products.
Thank you for your response.
Hi Use the below script: Here use Product for your requirement. Hope this will help you. Thank you.
Test:
LOAD *, if(Match(Link_Product, 'A', 'B'), 'Small', if(Match(Link_Product, 'C', 'D', 'E'), 'Large',if(Match(Link_Product, 'A', 'B''C', 'D', 'E'), 'Large'))) AS Product Inline
[
Link_Product
A
B
C
D
E
F
G
];
Load Link_Product,
if(not Match(Link_Product, 'G'), 'Total') AS Product
Resident Test;
Did you get the solution?