SmartSelect Dilema

paul_pichette

New Member
9.1C

So I wanted to use the SmartSelect to lookup possible values for a field as a combo box... Thing is that the values shown are dependent on another SDO:

CLIENT SDO -DATA-> CLIENT SDV

In the CLIENT SDV, I have a SmartSelect, with a reference to the CONTACT SDO that is in the SDV - however it is giving me all CONTACTS instead of the ones that pertain to that CLIENT. The field is the Main Contact for the Client.

Any suggestions?
 
The thing is that I have the SDO for the contact in the smartdataviewer to support the smart select, and the client sdo is this smartwindow, when I drop the smartdataviewer in the smartwindow, it doesn't try to link foreign key fields? Is it because the SDO are not both in the same smartwindow?
 
I assume that the CLIENT sdo is the data source for the SmartDataViewer.

You will have to go into the SmartDataViewer and add a data link from THIS-PROCEDURE to the CONTACT sdo.

Then, within the createObjects over-ride procedure, after RUN SUPER add the line
Code:
{set foreignfields 'CONTACT.[I]keyfield,keyfield[/I]' h-sdoCONTACT}.
where keyfield is the field you would normally use as the foreign fields and h_sdoCONTACT is the handle of the CONTACT sdo.
 
I was wondering that there might be a way to set the foreign key fields this way. You can't force the set foreign key fields dialog box to appear once you've dropped smart objects, and in my situation, it wasn't appearing!

Thanks!
 
One thing I noticed is that the query will not send any information if the foreign key fields make sense... I had mistyped the table name in the string, and it was not considering the mapping requirement, but not telling me I made a mistake! I had to double back on my steps and find the error.

Is there a way to get a tracking of smart object errors?
 
Back
Top