Picklists are usually used to provide a short range of predefined options that further describe our data. To make them usable it’s suggestible to keep the number of Picklist options to a minimum. Although a Picklist presentation layer is functional data is not always that boring and deserves a better re-presentation.
I personally think that controls should convey more emotions and strengthen bond between what is showing and how it’s shown. Take for example a simple Picklist that has values 1-5 that describe the account rating or a Picklist of shipping methods with well known company names. No doubt presenting the following control to the user makes more sense than just selecting a number.
The concept used in this example can be developed further to support more advanced scenarios. The nice thing about it is that most of the bits that handle the actual show and hide of the Picklist menu can be reused. So if you find yourself needing to create a more complex Picklist you should center most of your effort by overriding the buildPopup function (see code).
The code exposes most of the styling attributes which means you don’t have to tear it apart if you feel like redecorating ;+).
In order to facilitate the construction of options and their respective images the code uses a simple technique that accepts an Image base URL and utilizes the picklist id to identify specific images folder. The image names represent their index i.e. 0.gif, 1.gif, 2.gif and so on. If need to use option’s value instead you must also change the code that constructs the image URL.
CRMWeb
| -- ISV
|-- IMGPL (this is the ImageBaseUrl)
|-- selected.gif (A small arrow that points to the selected option)
|-- gi_rating (This is the Picklist id)
|-- 0.gif (Empty option X image – index 0)
|-- 1.gif (first option – index 1)
|-- 2.gif (second option – index 2 and so on..,)
Eventually the image URL is http://servername:port/iSV/IMGPL/gi_rating/1.gif
Feel free to comment.
String.prototype.Format = function( args )
{
return this.replace( /\{(\d{1})\}/ig , function match(){return args[arguments[1]];});
}
function ImagePicklist(picklistId)
{
var ipl = this;
if (!(ipl.Picklist = crmForm.all[picklistId]))
return alert("Picklist is missing");
if (ipl.Picklist.Disabled)
return;
ipl.ImageBaseUrl = "/ISV/IMGPL/";
ipl.HoverStyle = {Color: "#FFFFFF",Background: "#000000"}
ipl.HasEmptyOption = true;
ipl.Height = 213;
ipl.BackgroundColor = "#FFFFFF";
ipl.Scroll = true;
ipl.Picklist.ondblclick = function(){show();}
ipl.Picklist.onmousedown = function(){show();}
ipl.Picklist.onfocusout = function()
{
ipl.Picklist.Popup.document.body.innerHTML = "";
ipl.Picklist.Popup.hide();
}
function show()
{
ipl.Picklist.Disabled = true;
buildPopup();
var left = ipl.Picklist.Position.X;
var top = ipl.Picklist.Position.Y;
var width = ipl.Picklist.offsetWidth;
var height = ipl.Height
ipl.Picklist.Popup.show(left ,top ,width ,ipl.Height ,document.body);
setTimeout(function(){ipl.Picklist.Disabled = false;},100);
return false;
}
ipl.MouseOver = function(option)
{
option.style.backgroundColor = ipl.HoverStyle.Background;
option.style.color = ipl.HoverStyle.Color;
}
ipl.MouseOut = function(option)
{
option.style.backgroundColor = ipl.BackgroundColor;
option.style.color = "#000000";
}
ipl.Onclick = function(option)
{
ipl.Picklist.onfocusout();
ipl.Picklist.selectedIndex = option.index
ipl.Picklist.focus();
}
function getPosition(control)
{
var left = 0;
var top = control.offsetHeight;
do {
left += control.offsetLeft;
top += control.offsetTop;
} while (control = control.offsetParent);
return {X:left,Y:top}
}
function buildPopup()
{
ipl.Picklist.Position = getPosition(ipl.Picklist);
ipl.Picklist.Popup.document.body.style.backgroundColor = ipl.BackgroundColor;
var div = document.createElement("DIV");
div.style.cssText = "overflow-y:{0};height:{1}px;".Format([(ipl.Scroll?"scroll":"hidden"),(ipl.Height-13)]);
for (var i=(ipl.HasEmptyOption?0:1);i< ipl.Picklist.options.length;i++)
{
var option = ipl.Picklist.options[i];
var item = document.createElement("DIV");
item.index = i;
item.onmouseover = "document.ImagePicklist.MouseOver(this);";
item.onmouseout = "document.ImagePicklist.MouseOut(this)";
item.onclick = "document.ImagePicklist.Onclick(this)";
item.title = "Value = {0}".Format([option.value]);
item.style.lineHeight = "25px"
item.style.cursor = "hand";
var selItem = null;
if (option.selected)
{
selItem = document.createElement("IMG");
selItem.style.height = "16px";
selItem.style.width = "16px";
selItem.src = "{0}selected.gif".Format([ipl.ImageBaseUrl]);
selItem.align = "middle";
}
else
{
selItem = document.createElement("SPAN");
selItem.innerHTML = " ";
selItem.style.width = "16px";
}
item.appendChild(selItem);
item.appendChild(document.createTextNode(" "));
var img = document.createElement("IMG");
img.src = "{0}{1}/{2}.gif".Format([ipl.ImageBaseUrl,ipl.Picklist.id,i]);
item.appendChild(img);
var optText = null;
if (option.selected)
{
optText = document.createElement("B");
optText.innerText = " {0}".Format([option.innerText]);
}
else
{
optText = document.createTextNode(" {0}".Format([option.innerText]));
}
item.appendChild(optText);
div.appendChild(item);
}
ipl.Picklist.Popup.document.body.innerHTML = div.outerHTML;
}
{ //Initialize
ipl.Picklist.Popup = window.createPopup();
/* A reference from the window popup to ipl */
ipl.Picklist.Popup.document.ImagePicklist = ipl;
var popUpBodyStyle = ipl.Picklist.Popup.document.body.style;
popUpBodyStyle.border = "1px solid gray";
popUpBodyStyle.padding = 0;
popUpBodyStyle.margin = 5;
}
}
function OnCrmPageLoad()
{
window.ctcPicklist = new ImagePicklist("customertypecode");
ctcPicklist.ImageBaseUrl = "/ISV/IMGPL/";
ctcPicklist.HoverStyle = {Color: "gold",Background: "#FF3454"}
ctcPicklist.HasEmptyOption = false;
window.accPicklist = new ImagePicklist("accountcategorycode");
accPicklist.Height = 85;
accPicklist.Scroll = false;
accPicklist.BackgroundColor = "yellow";
window.graPicklist = new ImagePicklist("gi_rating");
graPicklist.Height = 165;
graPicklist.Scroll = false;
graPicklist.HoverStyle = {Color: "navy",Background: "#FFFFFF"}
}
OnCrmPageLoad();
238 comments:
«Oldest ‹Older 201 – 238 of 238Extremely helpful article !!Please visit:
hellotechhub
Windows Help and Support
QuickBook Support
Computer Repair Services
Thank you for sharing this excellent article:
ad formats
clickflox
Thanks for providing such a great post.Please visit:
Virtual phone system
free virtual phone system
VOIP numbers
call forwarding
international calling
VoIP
all call recording
thanks for sharing this blog with us .
adarsh welkin park
provident east lalbagh
Really helpful article thank you for sharing Data science training in Hyderabad
Contact No: 9642000668
9642000669
Very Informative and nice articleand keep posting
Thanks for sharing valuable information..
Best Digital Marketing Training Institute in Warangal
Nice post..
Java Full Stack Course in Warangal
"Transform your digital presence with Spack-Digi. We offer web design, app development, digital marketing, graphic design, CRM, and CMS solutions. Partner with us to elevate your online brand and drive results
"The enhancements made to the picklists in CRM 4.0 significantly improve the user experience by providing a cleaner, more intuitive presentation layer. These updates allow for better customization and management of data, making it easier for users to select and manage entries. The streamlined interface reduces clutter and enhances usability, ultimately leading to improved workflow efficiency."
Digital Marketing Course In Hyderabad
Grateful for this content given us Aston Overseas Education Consultants | Study Abroad
ONLEI Technologies TrustMyView
QnAspot
nice information and if you looking digital marketing courses in bangalore contact us
digital marketing at kochi
I’m thrilled to read your article as I found it highly informative. Please keep creating such excellent content!
Angular Online Job Support
Great insights into the improved picklist functionality in CRM 4.0! Enhancing the presentation layer not only streamlines data entry but also significantly improves user experience by simplifying the interface. This update seems especially helpful for organizations managing large volumes of data across multiple fields. Looking forward to seeing how these enhancements impact efficiency in day-to-day CRM tasks
Digital Marketing Course In Hyderabad
Digital Marketing Course In Ameerpet
This article is remarkable! The insightful and well-structured content made it a delightful and informative read throughout.
SAP MM Training in Hyderabad
Your blog provided valuable insights that we can really work with. Every tip shared in your post is incredibly useful. Thanks so much for offering such helpful content. Keep up the great work!
SAP FICO Training in Hyderabad
Looking for Top SEO Training In Hyderabad With 100% Practical Knowledge that guarantee placements? Great! “While some fundamentals remain unchanged, such as using relevant keywords and prioritizing mobile optimization, new trends emerge regularly. Consequently, staying updated is crucial for success.”
I truly appreciate the valuable information shared in this blog. It offers great benefits and insights for visitors. Thanks for providing such useful and informative content. This website is really helpful and worth exploring!
SAP FICO Training in Hyderabad
Picklists are a practical way to way to short range of predefined options, helping users efficiently categorize and describe data. To maximize usability, it’s recommended to keep the number of Picklist options to a minimum.
However, while picklist/a> offer functional and straightforward data presentation, they can sometimes feel dull and uninspiring. Data doesn’t always have to be boring—it deserves a more dynamic and engaging representation. By creatively enhancing how Picklist data is displayed, we can make information more appealing without sacrificing functionality.
it’s recommended to keep the number of picklist t options to a minimum.
Digital marteking
we offer
free to contact us
Great insights on how CRM 4.0 is evolving the picklists presentation layer! Enhancing UI/UX at the picklist level might seem like a small change, but it can significantly boost user productivity and data accuracy. It’s exciting to see how customization and dynamic rendering are being prioritized in modern CRM systems.
I’ve also covered some practical use cases and automation tips in a recent post here
Manual Testing
– would love your thoughts on it!
Selenium
I appreciate this fantastic blog post! I enjoyed reading it. Anyone pursuing artificial intelligence course in Coimbatore. Gain professional skills Latest AI technology course in Coimbatore, 100% placement guaranteed.
BlogSpot
Thanks for sharing your blog with us
devops institute hyderabad
[url=https://www.qatarflights.uk]Qatar Flights[/url]
I recently came across theSAP GRC Security training in Hyderabad.
offered by Version IT, and it looks extremely promising for anyone aiming to build a strong career in SAP security and compliance. The training structure seems very practical, focusing on real-time scenarios and certification preparation. I appreciate how the institute is offering professional-level training that aligns with industry needs. This SAP GRC Security Training in Hyderabad is definitely a great opportunity for both freshers and working professionals. Looking forward to enrolling soon!
Thanks for the informative post! SAP SuccessFactors Training in Hyderabad by Version IT seems like a great opportunity for aspiring professionals aiming to build a strong career in HR cloud technologies.
Thanks for sharing this insightful blog on SAP GRC Security Training in Hyderabad. In today’s enterprise landscape, managing risk and ensuring compliance are top priorities, and SAP GRC plays a key role in achieving that. It’s great to see training programs that focus on real-time implementation, access control, and governance frameworks. This will definitely help aspiring SAP professionals strengthen their careers in the security domain.
Informative post! For anyone interested in mastering SAP Security, the SAP GRC Security Training in Hyderabad by Version IT is a great choice.
Informative post! For anyone interested in mastering SAP Security, the SAP GRC Security Training in Hyderabad by Version IT is a great choice.
Post a Comment