Jump to content

LookupComboBox


rvenky20001

Recommended Posts

The normal UniDBlookupCombobox has two tables connected to it. One from where it looks up the details while the other to which it save the data.

The UniLookupCombobox will have only the look up table attached to it while the other table will not be there. This is normally used

for selection critera etc like for reports. You need to look up the customer database to select the customer for whom the report has to be generated but the selection does not have to be save to any database.

Link to comment
Share on other sites

When I have multiple fields in the listfield propery in the LookupCombobox, in the Normal Desktop mode, I am able to pickup the value selected by accessing the keyvalue property.

But in webmode , both the fields with a hiphen is picked up when I use the getValue() function. How can I get only the keyvalue in the Webmode when I am calling a ajaxRequest with the current value as one of the parameters in the Onblur event ?

 

Venkatesh

Link to comment
Share on other sites

The lookupcombo is the key field. On exit of the field, I normally check the database if the key field exists In case it exists then the data is available for editing else a new record is appended so that the user can add the new record.

 

 

 

Client event

 

function OnBlur(sender)

{

ajaxRequest(sender,'checkuserid',['muserid='+Fmusermas.muserid.getValue()]);

}

 

The Ajax Event

 

 

procedure TFmusermas.museridAjaxEvent(Sender: TComponent; EventName: string;

Params: TStrings);

var muserid:string ;

ps:integer;

begin

if EventName = 'checkuserid' then

begin

muserid:= Params.Values['muserid'];

ps:= pos('-',muserid);

if ps > 0 then

muserid := trim(copy(muserid,1,ps-1));

CheckUserID(muserid);

end;

end;

 

Currently I have resolved the issue by checking for the '-' and extracting the key field.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...