Groove JScript code goodies - Groove Dropdown option enhancement
Today, I have a form that has a number of drop down selections. I have two issues that impact using drop downs in Groove.
-
Unsorted list of options: If use a number of lookups to existing data sources to create the drop down select options you end up with a list that is not sorted. You have each of your source data sets in the list, then appended to this is the next data set etc. etc.
This typically occurs when you create a list of users: A data set from a LOOKUP and another data set from the workspace member’s names. -
Losing Data: This is far more serious. If you have an existing record with valid data - it is possible to lose the data when someone edits the record.
Use Case: You create or update a record, as you navigate the record you select a workspace member name in the drop down , the drop down is populated via a lookup (or any other data type… it is easier to explain using workspace members) and then save the record. Now, remove the workspace member and then open the same record. You choice has been removed!!!
Why? Because the population method for the drop down does not take into account the currently open record.
Fix: We need to get the existing value and add to our drop down option list, select it as the default option. Easy…. but then you end up with an unsorted list! See problem 1.
Add a method to your Groove form to ensure that the existing form data is recalled, added and sorted to the drop down option list.
- Hook the existing Groove lookup population routine
- Get the existing record value
- Add to the option list if it is not present
- Sort the list
- Select our the value as the default choice
To do this is simple. Add the enhancement script to your Groove form design; ensure you select the script on each form.
How to obtain the enhancement?
Use Contact me.
And, if enough people start to read and use this tumblelog then, I will post all the Groove enhancements and codelets to a more suitable site.