on 11-03-2006 4:15 PM
Hello all,
my question is in the area of searching for products via the non-qualifier using the Java API. Can it be done? If so, how? I don't think there is a QualifiedLookupParameter class.
A concrete example of what I want to do is something like the following:
Product pricing is set by quantity. So, the quantity is the non-qualifier and price is the qualifier. I want to easily see all products with a "1-9 quantity" price (along with the price).
Is there a way to set up such a search?
Thanks in advance.
Hi Bruce,
Your code should look something like this:
ResultSetDefinition rsd = new ResultSetDefinition(<TABLECODENAME>);
rsd.AddField(<FIELDNAME (that points to qualified table)>);
Search search = new Search(<TABLECODENAME>);
FreeFormTableParameter fftp = searchPricing.GetParameters().NewFreeFormTableParameter(<TABLECODENAME);
FreeFormParameterField ffpf = new FreeFormParameterField((<FIELDNAME (that points to qualified table)>);
ffpf.Add(new NumericParameter(1,FreeFormParameter.GreaterThanOrEqualToSearchType));
ffpf.Add(new NumericParameter(9,FreeFormParameter.LessThanOrEqualToSearchType));
fftp.Add(ffpf);
A2iResultSet rs = catalog.GetResultSet(search, rsd, (<FIELDNAME (that points to qualified table)>), true, 0);
Hop this helps you out,
Good luck,
Gerwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bruce,
Ik think it might be possible to use the following part again:
ffpf = new FreeFormParameterField(<FIELDCODE>);
ffpf.Add(new StringParameter(<StringValue>.GetStringValue(),FreeFormParameter.StringParameterType));
fftp.Add(ffpf);
So just add it as an extra parameter to your FreeformTableParameter.
By the way, sorry for the late reply. I didn't get a notification that the topic changed.
Good luck,
Gerwin
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.