Filling a field using a script

Discussion created by kreisel on Aug 20, 2012
Latest reply on Aug 21, 2012 by kreisel

That's the title of my discussion, but maybe there is a better way....


I have a tables called Events and Items, and another in between called EventLineItems. EventLineItems is used as a portal on the Events layout to add Items to the event. This all works nicely if you happen to know the Item#.


Screen Shot 2012-08-20 at 19.58.58 .png


Originally, I used a pop-up window in Item# to list the item numbers, along with their description. Problem is, we could end up with hundreds of items. Instead the client would like to first choose the item category "Mixer", "Microphone", etc. and based on that then choose from all the items in that category.


Perhaps my question could end there if you have an easy way to do this. But what I've attempted to do is add a button next to the Item# that performs a script. The script opens another window with a new layout called AddItem.


Screen Shot 2012-08-20 at 20.04.26 .png


The user can then choose a category, which then uses a new table occurance to show only related Items. I thought I would then have a button next to the items that when clicked would run a script to pass the item number back to the original layout and fill in the Item# field. The problem is, I do not know how to pass the number back.


If you can help with this, or suggest a better method for it all, I would appreciate it.