on 04-10-2006 7:58 AM
Hi all,
In my main table "Employee" I have a multi valued Qualified lookup field "Skill" and a qualified flat lookup table "Skills" with qualifier "Employee ID".
When i perform freeformsearch on the table "Skills" with "Employee ID" as a search parameter. The search returns all the values for all the employess and in the resultset i am getting "Employee ID" value as 0 but the expected result is skills for the particular employee id specified in search.
I wnat to know how the records are retrieved from qualified lookup table with a qualifier. Also how to add edit and delete these records?
Hi Jaydeep,
As to my knowledge, you have to perform several steps to get your results:
1) create a search on the main table through which you receive the records you want to work with; Employee-ID for example.
2) use resultSet.GetIDs() method to get an intArray containing all the IDs of these records.
3) use the catalogData.getQualifiedLinks( .. ) method to retrieve an Array containing the qualifiers of these records. Use the same Search object as in 1), the table is the main table and set the fieldname to the name of the field of the main table containing the qualified multivalue lookup table - Skills in your case, I suppose.
The result is some array which contains the qualifier-fields of these records.
About writing these tables ... you can edit/delete the qualifier stuff from main table records by using the QualifiedLink object... try something like this for example:
String fieldName = <YourFieldName>;
String table = <YourMainTableName>;
Search search = <yourSearchObjectThingy>;
Value value = new Value();
A2iField field = new A2iField(fieldName, value);
A2iFields fields = new A2iFields();
fields.Add(field);
QualifiedLinkArray qLinks;
qLinks = catalog.GetQualifiedLinks(search, table, fieldName, searchResult.GetRecordIDAt(i));
if(qLinks.GetCount()>0) {
catalog.DeleteQualifiedLinks(table, fieldName,
searchResult.GetRecordIDAt(i), qLinks, searchResult.GetChangeStampAt(i));
}
I hope this helps
Best regards,
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.