cancel
Showing results for 
Search instead for 
Did you mean: 

Qual Table Question - Java API

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks!

I ran a quick test checking record count and this seems to work.

What if my qualified table had 2 non-qualifiers? As an example, let's say I am storing status codes for products that are assigned by sales organization and distribution channel (so those are my 2 non-qualifiers).

Former Member
0 Kudos

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

Former Member
0 Kudos

I liked your technique to extract the main records via non qualifiers.

Awesome.

Answers (0)