Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...