Script help for people and group sharepoint field

Hello ,
I want to perform a check by using javascript for people picker controls
sudhanshu sharma Do good and cast it into river :)

Hi,
According to your post, my understanding is that you wanted to perform a check using JavaScript for people picker controls.
Did you mean you wanted to make a validation of people picker control?
You can do the steps as below.
Just Add a content editor webpart in you list form(NewForm.aspx or EditForm.aspx) and put the script below: To add CWEP to you list form you can refer Link
2. Add your 'Control UserField_upLevelDiv ID'(Using View Source you can get upLevelDiv  id of that contol)
<script type="text/javascript">
function getPickerInputElement(identifier)
var tags = document.getElementsByTagName('DIV');
for (var i=0; i < tags.length; i++)
var tempString = tags[i].id;
if ((tempString.indexOf('UserField_upLevelDiv') > 0))
if(identifier == tempString)
var innerSpans = tags[i].getElementsByTagName("SPAN");
for(var j=0; j < innerSpans.length; j++)
if(innerSpans[j].id == 'content')
return innerSpans[j].innerHTML;
return null;
var PickerPerson = getPickerInputElement('Control UserField_upLevelDiv ID');
alert(PickerPerson);
// For Validation
if(PickerPerson == null)
alert('Please enter PP value.');
return false;
</script>
More information:
http://ankursharepoint.blogspot.in/2012/10/javascript-validation-of-people-picker.html
There are some similar threads for your reference.
http://social.msdn.microsoft.com/Forums/en-US/f1c2a651-a0fb-484d-af33-e7084439b6c8/validate-sharepoint-people-picker-using-javascript?forum=sharepointgeneralprevious
http://social.msdn.microsoft.com/Forums/en-US/df1664c6-a799-4f2b-8f9e-ac8c915c91f6/how-to-validate-people-picket-control-at-client-side-using-javascriptdesigner-in-new-formaspx?forum=sharepointgeneralprevious
http://social.msdn.microsoft.com/Forums/en-US/9021f00f-8830-4c3a-bdf1-03be84cfb6ca/people-picker-required-field-validation?forum=sharepointdevelopmentprevious
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support

Similar Messages

  • Reg:: People and Groups Permission reports in sharepoint 2013

    Hi Techys,
    We have one SharePoinr 2013 team site, The total number of users for the site is 3200 members. Now my customer requirement is, they requested a report for people and groups and its permissions along with member names by group wise.
    Example: I'm having one SharePoint 2013 team site named as "My Auditions", it contains 28 groups with different permission levels. Each group having minimum 70 users. Now we need a report for each group permission along with group members.
    Kindly help me to getdown from the customer concern.
    Many Thanks,
    Madhu

    I would suggest a tool like Metalogix ControlPoint. It can quickly produce nice looking reports for this type of information.
    Trevor Seward
    Follow or contact me at...
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Hi Trevor,
    I have decided to say very big thank for your great suggestion, I have installed the Control-point trial version in my personal Lab environment. It's working as i'm expected. But, I have to do the same task for my customer. How can i install the control-point
    in prod server without customer permission. even i'm having all uid and password as administrator.
    Could you please suggest me is there any scripting or ootb features.
    Many Thnaks,
    Madhu

  • Known limit for how many characters can be entered in the To field when adding People and Groups ?

    I am running MOSS 2007 SP1. I browse to site settings > People and groups and a group which has more than 60 members. I select all > Click Actions > Email Users. Nothing happens. I select less users, new outlook window comes up as it should. I am running outlook 2007. I first thought that the limit was 50 users, but different user selections let me select 51 users as well. I then concentrated on the character limit and I noticed that there were about 1580 characters in the To field when I selected 50/51 users.
    Is there a known limit in sharepoint/outlook client for this function on how many characters can be entered in the To field?

    Hello Amar,
    This is a by-design behavior, not from SharePoint side, but Internet Explorer. The limitation by the 2083 characters in IE for the Max URL length is described in the following KB article:
    (KB208427) Maximum URL length is 2,083 characters in Internet Explorer
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;208427
    As a workaround, you may need to divide the list up and not send all the email at the same time. Hope it helps!
    Best Regards,
    Lionel

  • How to update a People and group field using a sandbox solution

    Hi,
    I am creating a sandbox solution for office 365 and creating a custom form using visual web part, which will allow users to enter data in a custom list.
    And that list also have a user field. I am able to get SharePoint user field on the form (using javascript) which is searching for the user and get a value (working fine).
    Issue: But I am not able to save the user value. Because to save user value I require web, UserID and login name, to construct SPFieldUserValue object or string in "111;#TestUser" format. Moreover that user should be present in
    SiteUserInfoList. 
    I tried web.EnsureUser() but did not work under sanbox solution.
    Can you please provide any pointer or workaround to the problem? I may be missing something here.
    Thanks,
    Himanshu

    Hi,
    According to your description, my understanding is that you want to update the people and group field in Sandbox solution.
    In the sandbox solution, you can still use the web.EnsureUser() function to get the user information, see the thread below:
    EnsureUser in sandboxed solution
    In additional, there is a demo with your similiar requirement for your reference:
    Using the People Picker Control in Sandbox Solutions / Office 365
    Thanks
    Best Regards,
    Jerry Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • To implement search help for date and time fields details

    how can i implement search help for date and time fields in screen painter

    Hi
    Declare the variables as sy-datum and sy-uzeit or any other pre-defined data typ of date and ime types. Serach help will automatically comes.
    Aditya

  • Site administration link "people and groups" link breaks if you delete the excel services viewers group

    Creating a HNSC using powershell, the default groups are not created.  Used the UI method of creating the default groups.
    However, if I delete the "excel services viewers" group, the site administration link "people and groups" breaks.  I have attempted to "set the default group" again, after creating the "site default groups" as
    mentioned above, but still no luck.
    Anyone seen this?  Should it be reported as a bug?
    Joshua Fuente

    Hi Joshua,
    For troubleshooting your issue, you can create the default groups using the following PowerShell script and see the result:
    Add-PSSnapin Microsoft.SharePoint.PowerShell
    $currentUser = "$env:USERDOMAIN\$env:USERNAME"
    $siteCollectionUrl = "http://manasbhardwaj.net"
    $siteCollectionName = "Manas Dev Site"
    $webApplicationUrl = "http://manas"
    New-SPSite -Url $siteCollectionUrl -OwnerAlias $currentUser -Name $siteCollectionName -Language 1033 -HostHeaderWebApplication $webApplicationUrl -Template sts#0
    $web = Get-SPWeb $siteCollectionUrl
    $web.EnsureUser($currentUser)
    $web.CreateDefaultAssociatedGroups($currentUser, "", "")
    Reference:
    http://www.codeproject.com/Articles/790726/How-to-create-default-groups-in-SharePoint-Host-Na
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Eric Tao
    TechNet Community Support

  • How to Remove Treeview in people and group dialog window

    I need to remove the treeview in people and group dialog window in sharepoint online. Any suggesstions?

    Hello,
    For those still looking, you should ask on the
    SharePoint forums.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?&lt;=\G.{2})'|%{if($_){[char][int]&quot;0x$_&quot;}})

  • People and Groups not appearing in Address List

    We have an Exchange 2013 deployment running on Windows 2012 Standard servers. Some of our people and all our groups are not showing up in the Outlook Address Book on people's client application. This despite the fact that "hide name from address book"
    is unchecked on these people and groups.
    This affects both those running Outlook and OWA.
    Any idea how I can go about troubleshooting this?
    ----------- Ron E Biggs Chief Tech Officer Entertainment Studios

    Hi,
    From your description, I would like to clarify the following things:
    1. Outlook in cached mode automatically updates the offline address book on the client every 24 hours. The 24-hour time period is measured from the time that the offline address book was last downloaded successfully. So sometimes new users can't be displayed
    immediately on Outlook.
    2. If you would like to show the dynamic distribution groups in “All Groups”, you can use the following cmdlet.
    Set-AddressList -Identity "all groups" -RecipientFilter "(RecipientType -eq 'MailUniversalDistributionGroup' -or RecipientType -eq 'MailUniversalSecurityGroup' -or RecipientType -eq 'MailNonUniversalGroup' -or RecipientType -eq 'DynamicDistributionGroup')"
    Here is a helpful thread for your reference.
    Let the dynamic distribution groups be shown in “All Groups”
    https://social.technet.microsoft.com/Forums/en-US/d32a94af-eb46-407e-9129-c977c32d2a48/let-the-dynamic-distribution-groups-be-shown-in-all-groups?forum=exchangesvrgeneral
    Hope this can be helpful to you.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • People and group column become empty on EDIT ITEM

    Hi,
    I have 3 people and group columns(Peopleonly type) in my custom content type and list definition from the content type. When I EDIT an item from the list , the values in the 3 people and group column dissappear(meaning the fields are shown empty). Has
    anybody come across this behaviour. Any solution/workaround ?

    Hi Vipul,
    Did this only happen to the EditForm.aspx page of that custom list ? 
    Is this EditForm.aspx page customized ?
    Please also check whether there are some related errors in 14\LOGS.
    Please re-create another new EditForm.aspx page using the SharePoint Designer 2010, then check result again.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Could we have same name's for User and Groups in Active directory

    When iam trying to create a user name " Logistics " under a OU, I am getting a error
    "The pre-windows 2000 logon name you have chosen is already in use in this domain. Choose  aother pre-windows logon name, and then try again"
    We already have a group by the name " Logistics "
    Could we have same name's for User and Groups in Active directory?
    Thanks in Advance

    sAMaccountName attribute is unique. So, the short answer is you cannot.
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • F4 help for month and Year field in ztable please

    I have created a ztable. 
    The first field in my ztable is a primary key field and it holds MM/YYYY(eg.  08/2011).
    How ever my requirement is when ever we want to see the output, uer wants F4 help on that fields and when he selects the range , the ztable should display the values in that range.
    For eg.
    1). if user selects   01/2011  to 08/2011 using F4 Help,
    2). then the ztables should display all the records in that range.
    Thanks in advance for your help.
    Best regards,Sam
    Moderator message : Spec dumping / Outsourcing is not allowed.  Thread locked.
    Edited by: Vinod Kumar on Aug 8, 2011 11:17 AM

    Hi Sam,
    Create an F4 help using this FM
    l_t_date" has month and date
    l_f_programm = sy-repid.
        l_f_dynnr    = sy-dynnr.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield         = 'Date'"Field name of coloum of value tab
            dynpprog         = l_f_programm
            dynpnr           = l_f_dynnr
            dynprofield      = <>"Screen field name'
            value_org        = 'S'
            callback_program = l_f_programm
            callback_form    = ''
          TABLES
            value_tab        = l_t_date"Value table for date and month
    *      FIELD_TAB        = L_T_RETURN
            return_tab       = l_t_return_tab
          EXCEPTIONS
            parameter_error  = 1
            no_values_found  = 2
            OTHERS           = 3.
        READ TABLE l_t_return_tab INDEX 1.
        IF  sy-subrc = 0 .
        <fields> = l_t_return_tab-fieldval.
        ENDIF.
    Regards,
    Amit
    then filter the ztable accordingly

  • Group Description in Drill down and grouping on field

    I want to put a formula field for grouping, but I want to display some text(description) in group drill down.
    My group field is numeric and I want to display text on right side of drill down report.

    Hi Seema,
    In order to display a different group name you may try the below steps:
    -  Right click on the group and click on change Group option and then click on Options taband then check the box which says 'Customize Group Name Field'.
    - Now either 'choose from existing field' or 'use a formula as group name' to display the group description.
    This would help you to display the appropriate description for that field.
    Regards,
    Komal Prasad

  • Script Help for iPhoto

    fairly new to Mac. I life iPhot....except, when I mod a photo, it moves to a completely different folder. My simple mind can't grasp the fundamentals of either applescript or automator. Can someone help me write a script that will help move the modified photo's from the iphoto library's "modified" folder, back to the original folder?
    Mahalo,
    Mike

    You can drag and drop the image from iPhoto to wherever you need it. For example, just drag and drop an image from iPhoto to the Desktop, and then you have a copy on the Desktop. If you don't want it in iPhoto anymore, just delete within iPhoto and the original and any modifications are gone. You'll also find buttons in iPhoto that let you easily set your Desktop background, send photos in an email, or publish them with iWeb, among other things.
    iPhoto is for not having to worry about where or how your photos are organized on the your hard drive, just like iTunes does for music. Just let iPhoto handle the organization. Free your mind, let your computer do the work. This is the 21st century, you know.
    Also consider creating albums in iPhoto for your own grouping, and tagging images with keywords and comments so you can create smart albums to automatically do the grouping for you. You can also drag and drop an image from one film roll to another or combine film rolls. Time to let go of the Finder when it comes to organizing your images.

  • General HELP for RAID and HOME NETWORK... I'm a bit lost :(

    First off, I'm sorry about the long post but I just wanted to ask everything at once since I don't know what effects what?
    Over the past years I've had a MBP and have always added Western Digital Mybook drives whenever I needed storage. One of clicked and died this past year and I lost some data since I was "MANUALLY" backing up. Since then I've tried to read about RAID, NAS, and DROBO type devices.
    I recently bought a Mac Pro 2008 edition because I needed more speed. I mainly edit wedding photos in Lightroom but also come from a heavy motion graphics background and do some After Effects projects from time to time.
    Here's a list of my current setup and what I'm hoping to achieve but I'm in over my head of what to do???
    1 Mac Pro (2008 edition) - I'm considering setting up 4 1TB harddrives inside that are mirrored. I was looking at the Caviar Black or Hitachi drives...
    2. I have two Airport Extreme Base Stations for my home network. (One is plugged into my Mac Pro and the other is near my Vizio LCD and Xbox 360. I've been toying around with sharing iPhoto slideshows (which I really like the idea of) The problem is that it seems really slow for video and hiccups on the stills sometimes. It doesn't seem to make a difference if it's pulling it from the Mac Pro or from a USB drive attached directly to my Airport Extreme. How do I speed this up? Is it always going to be faster to stream from the Mac Pro over ethernet cable than a harddrive plugged in through USB?
    3. A few RAID and NAS solutions I've been looking at are the following but I don't really understand what I get with an external device vs an internal? I also don't know which is BETTER? for easy reliable backup.
    http://firmtek.stores.yahoo.net/sata5pm2se2.html
    http://www.dlink.com/products/?sec=0&pid=667
    http://www.qnap.com/prodetail_feature.asp?pid=110
    http://eshop.macsales.com/shop/hard-.../RAID/Desktop/
    http://www.synology.com/enu/products/CS407/index.php
    4. I've been reading mixed reviews about the Drobo but don't quite understand if it's a better solution then setting up a mirror INSIDE my Mac Pro. I DO NOT want to buy a $900 raid card for the Mac Pro though. Do most people choose the Drobo because they only have laptops? Should I only consider building something inside my Mac Pro?
    5. I was considering Chonosync for backing up 3rd level backups
    6. I just bought a Blu-Ray drive for 4th level backups that I can send off site.
    7. I have all these other Mybooks. Two of them are mirrored but only one is a 1TBx2 Sata drive. The rest are IDE. I guess I'll just use these for misc things? Maybe just plug one into the Xbox for watching movies?
    8. My neighbor down the hall has a similar setup and is using a Mac Mini to stream things (through Front Row) like Hulu and videos another room to his TV. Mine doesn't seem to stream fast enough. Since I have the MBP that I will use rarely since I got my desktop I was considering using that instead of Apple TV or a Mac Mini but it's too slow? Maybe I set it up wrong?
    PLEASE HELP? I don't know what I'm doing.

    A few RAID and NAS solutions I've been looking at are the following but I don't really understand what I get with an external device vs an internal? I also don't know which is BETTER? for easy reliable backup.
    Hi,
    For backup, video work, photography and expanding the Mac Pro storage capability the FirmTek SeriTek/5PM would be my choice. The bundle that you pointed to will work if 130MB/sec. is fastest enogh for your needs. The card is only $70 in the bundle which makes it a nice deal.
    http://firmtek.stores.yahoo.net/sata5pm2se2.html
    If you want 200MB/sec, performance I would go with the Sonnet Tempo E4P or the HighPoint RR 2314 if you desire RAID 5 redundancy.
    http://www.amug.org/amug-web/html/amug/reviews/articles/sonnet/mac-pro/
    http://www.amug.org/amug-web/html/amug/reviews/articles/highpoint/2314/
    Trying to use NAS via the network will be 3-7x slower than the SeriTek/5PM. The SeriTek/5PM is a much better choice for backup, video and photography. NAS is good for low energy, always on, low use server needs. However, you can simply turn Mac OS X file sharing on and the Mac Pro will provide performance faster than any NAS.
    Drobo - Why do people even consider this option?
    The performance is USB speed even with a FW800 connection.
    Users have reported losing data with firmware updates.
    And the unit is one of the most expensive, slow performing options available. I cannot image ever wanting a Drobo
    Backup Software:
    I like SuperDuper. I also like using the "Restore" tab in Disk Utility to clone one disk to another. The key to good backup is to keep it simple and regular.
    MyBook - NOT
    If your storage needs exceed more than a single FireWire backup disk you really need to go with eSATA. The SeriTek/5PM and the Mac Pro combination provides virtually unlimited storage capabilities as the tray system allows new hard disk sets to be easily loaded or dismounted.
    Have fun!

  • How to create a F4 help for a report selection screen field

    hi,
    can any one guide me to create F4 help for a field in a selection screen in a report program,plz give me a sample code

    hi,
    Here are the following ways
    1.with the help of match code objects we can create the F4 Functionality for Field.
    Syntax is :
    PARAMETERS: p_org LIKE t527x-orgeh MATCHCODE OBJECT zorg.
    2. One more thing is we can do it with Search Help's also.
    3. Even we can do it HELP Views also.
    Help Views:
    You have to create a help view if a view with outer join is needed as selection method of a search help
    The selection method of a search help is either a table or a view. If you have to select data from several tables for the search help, you should generally use a database view as selection method. However, a database view always implements an inner join. If you need a view with outer join for the data selection, you have to use a help view as selection method.
    All the tables included in a help view must be linked with foreign keys. Only foreign keys that have certain attributes can be used here. The first table to be inserted in the help view is called the primary table of the help view. The tables added to this primary table with foreign keys are called secondary tables.
    The functionality of a help view has changed significantly between Release 3.0 and Release 4.0. In Release 3.0, a help view was automatically displayed for the input help (F4 help) for all the fields that were checked against the primary table of the help view. This is no longer the case in Release 4.0.
    As of Release 4.0, you must explicitly create a search help that must be linked with the fields for which it is offered (see Linking Search Helps with Screen Fields ).
    Existing help views are automatically migrated to search helps when you upgrade to a release higher than 4.0.
    A help view implements an outer join, i.e. all the contents of the primary table of the help view are always displayed. You therefore should not formulate a selection condition for fields in one of the secondary tables of the help view. If records of these secondary tables cannot be read as a result of this selection condition, the contents of the corresponding fields of the secondary table are displayed with initial value.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 15, 2008 3:15 PM

Maybe you are looking for

  • Time Capsule - how to gain "over-the-internet" access from Windows 7!

    Hi guys, I've been fighting for such a long time with my Time Capsule. I have no idea how to gain access "over-the-internet" on a PC (Windows 7) which is running on  another network. My Time Capsule is set up with my Macbook Pro at home running Lion

  • Is there a way to prevent a PDF file from being forwarded?

    is there a way to prevent a PDF file from being forwarded? For example, im a personal trainer and if i send a client a plan via PDF file, i want to make sure that they cannot send it to anyone else. I read about how you can secure a file by creating

  • Sending "high resolution" image to a magazine

    Greetings, I have to send a "high resolution" image to a magazine, but I don't know what they mean exactly. I guess I need to send the highest quality photo possible. What export settings do I use in Aperture? I shot the image with a Nikon D40 (6mp)

  • Faxing problem

    I keep getting a busy signal when I try to send a fax. can someone help me troubleshoot

  • Excel Loading Scenario - Which Component ?

    Hi, i have a xlsx workbook with 20 worksheets, each worksheet has a number of ranges in it (a1 - d4, a6 - e20 and so on). I would like to redev it with the most suitable excel component (the previous developer used Excel + / CozyRoc but i am not goin