I know I've seen another post about this. I want to include the option for a user to add a "missing" entry to a list from a form that uses the list as a dropdown menu. Anyone remember this?
thanks,
RonCK
RonCk
I wrote some Javascript code to do this. It may take me a day or two to find it (I am very busy on a project). I will post it then
Terry Stickel, PDM Consultant
TStickel Consulting
Sanibel, Florida
Call javascript like below:
var selectObj = document.all.field_name_to_insert_value_into; //var selectObj = getFieldByName("field_name_to_insert_value_into"); //is alternate code line var opt = document.createElement("OPTION"); selectObj.options.add(opt); opt.innerText = "missing entry text"; opt.value = "missing entry value";
var selectObj = document.all.field_name_to_insert_value_into;
//var selectObj = getFieldByName("field_name_to_insert_value_into"); //is alternate code line
var opt = document.createElement("OPTION");
selectObj.options.add(opt);
opt.innerText = "missing entry text";
opt.value = "missing entry value";
SamsAn.Original Mind Any Level Innovator Solutions Free-Lancer, http://sites.google.com/site/caraacc
SamsAn's code will do what you asked for. The solution I wrote is more complicated because it had to meet the following partial set of requirements (let me know if you still want me to look for this code):
1. Automatically inserts an <Add> selection for designated for Selection Lists, unless the Form is not opened for update. The Selection LIsts do not have to be pre-populated with the <Add> selection.
2. If the user selects <Add> then a pop-up window will be displayed that allows the user to enter a new text/value combination for the Selection List. This pop-up window is the same one that appears if the user had the privilege to add a record to the list via /Administrator/Lists. Thus, the new entry is reflected in the List on the Form and in the Innovator database.
3. After the user adds a new text/value combination then it will be automatically selected in the forms Selection List
4. When a Form is displayed/re-displayed then the Selection Lists will automatically be re-populated with the latest values from the database. This over-comes the biggest problem with Innovator "out-of-the-box" lists, they are not dynamically repopulated (ie. In Innovator 9.0.1 if the list contains 3 text/value pairs when user A logs on the Innovator and displays a form that uses the list, then the Administrator adds a 4th text/value pair in another Innovator session, even if user A refreshes the form display they will not see the 4th text/value pair unless they log off Innovator and log back on).
Terry,
That would be great if you could dig that code up this weekend. I've done my best to give users excellent starting Filter Lists, but I know there will be oversights. I would like them to be able to augment the filter lists. They would need the pop-up window to have Value/Label/Filter.
The code and some description can be found at http://www.aras.com/Community/wikis/kb/itemtype-list.aspx
It may not do exactly what you are looking for, but it has provided a facility users at one of my customer's sites to dynamically add entries to selection lists.
Thanks for posting that Terry. I'm going to get someone on my team trying that right away. We'll need to adjust it as we are using Filter Lists. We'll post what we come up with once we get it working.
Thanks,
My code will already handle a type of list filtering (see "itemwhere" in the method kLoadList).
I was wondering what if instead of a popup window, the method opens the "edit list" window on <add> click event and have the users enter the values in the list itself.
Any ideas on how to do this?
Thanks SamsAn, That was totaly solution what i need..
Hi tstickel,
This Coding( http://www.aras.com/Community/wikis/kb/itemtype-list.aspx) Working only on IE8. I am using IE9 but Doesn't Working IE9.So Please any one helping how to this script working on IE9.
Thanks & Regards,
Arunkumar