Alternative to lookup

Sorry for the obvious question.

Is there an example/tutorial/video etc. of using a popup form instead of the select drop down? I have a large table to search and and link from an existing form. I need a more robust search capability. Other ideas welcome.

Ah that’s not so difficult. Just create a grid of the table you want to select from. Then create in your master application a caption link on the field you want to this grid form. In the link you can declare the link properties to modal and apply the size of the popup. That’s all. If you click on the icon your grid will popup and contains a select button on every row. You can hit search to find a certain record. Also you can set the search in the grid initially, then the popup will contain the search screen initially and after search the grid.

So simple!! Thanks for your help. Just thinking about the code to reproduce this is mind bending. My client thinks I’m a genius.

That works really great, but . . . I am returning the unique id. What I’d like it to do is show the customer name the way that a select would on the id. I tried changing the field to a select but then the capture link disappears.

Just fill the lookup part on the field to select the customer name.

Well that’s embarrassing, but thanks.

I didn’t think of this solution to my problem.
i love to use this but instead of getting single value i wold like to get multiple values in a comma separated values, is it possible ? please say yes :frowning:

You can, but not this way. You need to apply an (ajax) event and put your select code there.

can you explain the way in more detail please ? do i still use the capture link ?

No, you just create an event on a field. Suppose you have a personnel number and want to display the name, address and phone number. Then you create an ajaxevent onchange on the field number. In this event you write a small script to retrieve the other fields by number and put them in the form variables. That’s all. But you cannot combine events. If you have a capture link then the onchange event on the field probabely is not firing, it one of the issues we had. Then you need to be a bit inventive by using an onenter on the first focus field.

Thanks aducom
I am sorry perhaps i didn’t explain what im trying to do right.
i want to select multiple records from another table (same as what you will do with multi select) but with a better way and more advanced search.
ex: i want to display a grid with a check box next to each row and after i select the desired records i save the values in a variable such as (1,5,65,854,25) and in the master form i do a lookup to get the description passed on the value (name,name3,name2)

You can create grids with checkboxes and process every selected record. But if it will suit you… I doubt it. I’m affraid you are going over the bounderies of the possibilities afaik.

Albert, I think mohammad has a point, i was looking into this because i have a similar case…

i have a multiple records form, one of the fields in the row need to be a select (double select) so user can select 1 or more values for the same field

  • i have changed the sql type in db to “varchar” the only one could handle the multiple values as 1;2;3;4…
  • now it is ok i have in each row a combo box in height 4 so 4 spaces are reserved from the from to show left/right side of the combobox, but mostly i have selected 1 value only, so i have the cobmobox just displayed blank space for nothing…

what i am thinking of (i think mohammed is trying to say the same) is:

  • to have single text box with small select button, that will give the capture link application to select the value…
  • next, a small (+) button, so if user wants to add new value, clicks on that and gives him another text box with select button for the capture link…
  • hence, we will make the user display and chose only how many values he needs, no more, no less, with less space cunsumed…

actually i see this in many websites (add line, if necessary) but i have yet not idea how to do it using sc

what you think guys?

hi again, this is exactly what i’m trying to explain… the functionality of the lookup of sc is the same idea i am trying to inquire for…

what you think?

addplus.png

Albert,

I’m using a capture link on a form. Everything works great when just looking up existing records. However sometimes the user needs to add a record if they don’t find it. After they add the record I want to select it and return to the original form just as if they had hit the select button. Is there a way to control that? If not, is there a way to force the grid to position itself on the page that includes the record that was just added?

Thanks!

Ted

It’s a good and logical question. But I simply don’t know the answer. Of course you can put some code in the onafterinsert. But you have to close the form and pass the data. I suggest you look in the generated code to see what’s behind the select button. Then you should be able to perform the automatic select of the latest added record. I think this is a serious issue to be put highly on the wishlist. Another untried option is to set the sql statement to this last insert. Then you will have a list of only one item. Still need to hit the select, but you skip the search. Not perfect, but better…

Thanks Albert. I think the best solution at this point is to set the sql statement as you suggested. So I would do that in the onafterinsert event? And if so, how would I know the ID of the newly inserted record?