on 04-05-2009 4:34 PM
Hi All,
I have a requirement for searching a qualifier Look up and the Non Qualifier is a flat look up table.
I need to search on the qualifier values based on one value of Non Qualifier field.
Its like I have an Identification column in main table which is linked to an Qualifier - "ID".
ID has three fields -
IDType(Non - Qualifier) - this is a Flat look up
IDVal - Qualifier
IDCountry - Qualifier
Please help....
Regards,
Priya
Hi Priya,
You may use the below code for searching Qualifiers for a Given Main Table record:
ResultDefinition objResultDefiniton = new ResultDefinition(new TableId(strMainTableID));
objResultDefiniton.addSelectField( new FieldId( (strMainTableQualifierFieldID ) ) );
RetrieveRecordsByIdCommand objRecordsByIDCommand = new RetrieveRecordsByIdCommand(getConnectionAccessor());
objRecordsByIDCommand.addId( new RecordId(strMainTableRecordID));
objRecordsByIDCommand.setSession(strUserSessionId);
objRecordsByIDCommand.setResultDefinition(objResultDefiniton);
objRecordsByIDCommand.execute();
if(objRecordsByIDCommand.getRecords().getCount() > 0)
QualifiedLinkValue objQualifiedLinkValue = (QualifiedLinkValue) objRecordsByIDCommand.getRecords().getRecord(0).getFieldValue( new FieldId( strMainTableQualifierFieldID )) ) ;
This will give you a QualifiedLinkValue from where you can retrieve the NoQualifier as well s Yes Qualifier values.
Since you have No Qualifier as a Lookup, you will get the Record Id of the No Qualifier in the QualifiedLinkValue. You can also try getDisplayValue() method of QualifiedLinkValue to get the Value of the no Qualifier(Not so sure i this last one will work).
Hope this helps!!
Cheers,
Arafat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.