Workflow to grant access to each List item based on a column value

Hi,
I have 2 lists Risks and RisksLookup.
In Risks, I have Title, Description, service impacted and status columns.
In RisksLookup, I have service impacted, AD1, AD2, AD3, AD4 and AD5.
I have a requirement where in I have to write a Workflow to provide access to each List item based on the value of service impacted. i.e. If service impacted in Risks List is Client A, I have to lookup what all AD groups are present for Client A in RisksLookup
List and provide access to only those groups for that item.
Regards, Shreyas R S

Hi
another approach
create 5 more lists, dedicated to each impacted service. for  Each one these lists apply needeed right ( based onAD groups )Keep you main list where first level will add new items . Attach a workflow to this main list, which will start when an item
is added and which will add specific item's value to his new list ( based on impacted service value )
Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

Similar Messages

  • Qualified list item based on two columns

    - fact table inludes following columns
    key1
    key2
    measure1
    In segment designer, update counts:
    the query must counts two columns "key1 and key2" that key1 and key2 together must be distinct.

    Here you go:
    SQL> WITH bill AS
      2  (
      3          SELECT 1000 AS billno, 101 AS advertiserid, 102 AS agencyid, 5000 AS total_value FROM DUAL UNION ALL
      4          SELECT 1001, 101, 103, 5000 FROM DUAL UNION ALL
      5          SELECT 1002, 101, 102, 1000 FROM DUAL
      6  ), account AS
      7  (
      8          SELECT 101 AS account1_id, 102 AS account2_id, 'John' AS name, 50 AS empid FROM DUAL UNION ALL
      9          SELECT 101, 103, 'James', 40 FROM DUAL UNION ALL
    10          SELECT 101, 105, 'Joe', 60 FROM DUAL
    11  )
    12  /* End Sample Data */
    13  SELECT a.name
    14       , a.empid
    15       , a.account1_id
    16       , a.account2_id
    17       , SUM(b.total_value)
    18  FROM   account a
    19  JOIN   bill    b ON  a.account1_id = b.advertiserid
    20                   AND a.account2_id = b.agencyid
    21  GROUP BY a.name
    22         , a.empid
    23         , a.account1_id
    24         , a.account2_id
    25  ;
    NAME                 EMPID          ACCOUNT1_ID          ACCOUNT2_ID   SUM(B.TOTAL_VALUE)
    John                    50                  101                  102                 6000
    James                   40                  101                  103                 5000

  • CAML Query to Sort SharePoint list items based on Modified date

    hi ,
    can we sort sharePoint list items based on 'Modified' column, the sorting should be done up to milliseconds level.
    currently i am using CAML query as below
    <OrderBy><FieldRef Name='Modified' Type='DateTime' IncludeTimeValue='TRUE' Ascending='False'/></OrderBy>but its not considering milliseconds while sorting.
    Thanks and Regards,
    venkatesh.

    Veda, thanks but I'm not really a hardcore C# coder.
    We found more elegant solution was to create a List View which returns all records that should be deleted, based on our own custom deletion criteria, and then create an very simple SSIS Package in Visual Studio using the
    Sharepoint Connectors for SSIS to delete all Sharepoint List Items returned from that List View. The Sharepoint Destination Connector has a delete operation.
    This worked for us and didn't require any coding.

  • The workflow could not check out the list item.

    Hi Guys,
    I have a workflow enabled on document library and it needs to started manually.
    Whenever user starts workflow manually, gets following error:
    "the workflow could not check out the list item. Make sure the list item is not checked out." list item is not checked out & this workflow was working smoothly earlier.
    OutCome: The workflow operation failed because the workflow lookup found no matching item.
    I have gone through below links:
    https://christopherclementen.wordpress.com/2014/05/23/oob-approval-workflow-error/
    https://social.msdn.microsoft.com/Forums/office/en-US/f673d0f6-92eb-4057-95ff-ed3cb7790360/the-workflow-operation-failed-because-the-workflow-lookup-found-no-matching-item?forum=sharepointcustomizationprevious
    Any clue on this?
    Thanks, Nilesh

    maybe check out for editing documents setting is turned on so wokrflow needs doc to ce cheked out before proceding and user might not have permission to do that.
    please refer below link:
    http://sharepoint.stackexchange.com/questions/32399/workflow-error-the-workflow-could-not-update-the-item-possibly-because-one-or
    http://community.office365.com/en-us/f/154/t/243062.aspx
    http://stackoverflow.com/questions/1272957/document-checked-out-in-sharepoint-when-workflow-starts
    Please mark as answer if you find it useful else vote for it if it is close to answer..happy sharepointing

  • Generate Report -List item permissions against Each list Item

    Hi,
    I want to get "Item Permission" against each list item from List.
    I need to prepare a Report from this Information.
    Can anyone please help to get "Item Permission" against each list

    Hi,
    About how to enumerate permissions of each items using PowerShell, code snippet provided by Nancy in this similar thread would be helpful:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/509b7ea1-bd54-4fe3-842b-32fdc52e4f73/enumerate-list-item-permissions
    With the data retrieved, then you can export it to a .csv file:
    http://blogs.perficient.com/microsoft/2013/01/how-to-combine-powershell-cmdlet-output-in-a-single-csv-file/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Populate the values  to  list item based on a check box

    Hi,
    How can i populate the values from a field on the form to one list item based on a check box,
    the pseudo code is like,
    if checkbox = checked then
    populate the particular field value to the list item;
    checkbox = unchecked;
    next_record;
    end if;
    Thanks
    Bcj

    To populate a Tlist item, do the following:
    1. Create a TLIST item in the EMP block. and give it a height to accommodate several names.
    2. Using the TLIST property pallete:
    a. Set the Column Name property to EMPNO
    b. Click on the Elements in List property. Delete each List Element and delete each List Item Value. If you don't do this you will get an error when you compile.
    3. Create a record group using this query:
    select ename, to_char(empno) from emp
    4. Create a WHEN-NEW-FORM-INSTANCE trigger, and place this code inside the trigger:
    Declare
    err_num number;
    Begin
    clear_list('YOUR_TLIST');
    err_num := populate_group('YOUR_RECORD_GROUP');
    If err_num = 0 Then
    populate_list('YOUR_TLIST', 'YOUR_RECORD_GROUP');
    Else
    message('Error populating Tlist');
    message('Error populating Tlist');
    End If;
    End;
    5. Compile and run the form. The ENAMEs will appear in the TList, and each ENAME will have a value equal to its EMPNO.

  • How to implement tooltip for the list items for the particular column in sharepoint 2013

    Hi,
    I had created a list, How to implement tooltip for the list items for the particular column in SharePoint 2013.
    Any help will be appreciated

    We can use JavaScript or JQuery to show the tooltips. Refer to the following similar thread.
    http://social.technet.microsoft.com/forums/en/sharepointdevelopmentprevious/thread/1dac3ae0-c9ce-419d-b6dd-08dd48284324
    http://stackoverflow.com/questions/3366515/small-description-window-on-mouse-hover-on-hyperlink
    http://spjsblog.com/2012/02/12/list-view-preview-item-on-hover-sharepoint-2010/

  • Display list items based on another list item

    Hi All
                I want to display the list item based on another list item, but its not working.
    This is my code:
    /*WHEN-NEW-FORM-INSTANCE*/---Its working.
    DECLARE
       rg_district   recordgroup;
       rg_name       VARCHAR2 (40) := 'district';
       vtemp         NUMBER;
    BEGIN
       rg_district := FIND_GROUP (rg_name);
       IF ID_NULL (rg_district)
       THEN
          rg_district :=
             CREATE_GROUP_FROM_QUERY (rg_name,
                                      'select dist,dist from district_mas'
          vtemp := POPULATE_GROUP (rg_district);
          POPULATE_LIST ('BLOCK3.DISTRICT', rg_name);
       END IF;
       END;
    */WHEN-LIST-CHANGED*/---Not working. Cannot populate the list based on the List
       DECLARE
       rg_branch   recordgroup;
       rg_name1     VARCHAR2 (1000) := 'branch';
       vtemp       NUMBER;
    BEGIN
       rg_branch := FIND_GROUP (rg_name1);
       IF NOT ID_NULL (rg_branch)
       THEN
          DELETE_GROUP (rg_name1);
          rg_branch :=
             CREATE_GROUP_FROM_QUERY
                ('rg_branch',
                    'SELECT branch FROM dist_branch WHERE district IN (SELECT DIST FROM DISTRICT_MAS WHERE DISTRICT ='
                 || :BLOCK3.DISTRICT
          vtemp := POPULATE_GROUP (rg_branch);
          POPULATE_LIST ('BLOCK3.BRANCH', rg_branch);
       END IF;
       END;
    Table:
    CREATE TABLE DISTRICT_MAS
      DIST  VARCHAR2(100 CHAR)
    CREATE TABLE DIST_BRANCH
      DISTRICT  VARCHAR2(100 CHAR),
      BRANCH    VARCHAR2(100 CHAR)
    Values:
    insert into district_mas values('chennai');
    insert into district_mas values('coimbatore');
    insert into dist_branch values('chennai','chennai_north');
    insert into dist_branch values('coimbatore','Podanur');
    Regards
    Shagar M

    Hmm, not tested.
    try this..
    --*/WHEN-LIST-CHANGED*/
       DECLARE
       rg_branch       recordgroup;
       rg_name1     VARCHAR2 (1000) := 'branch';
       vtemp        NUMBER;
       QT            VARCHAR2(10) :='''';
    BEGIN
       rg_branch := FIND_GROUP (rg_name1);
       IF NOT ID_NULL (rg_branch)
       THEN
          DELETE_GROUP (rg_name1);
          rg_branch :=
             CREATE_GROUP_FROM_QUERY
                ('rg_branch',
                    'SELECT branch FROM dist_branch WHERE district IN (SELECT DIST FROM DISTRICT_MAS WHERE DISTRICT ='
                 || QT||:BLOCK3.DISTRICT||QT||')'
          vtemp := POPULATE_GROUP (rg_branch);
          POPULATE_LIST ('BLOCK3.BRANCH', rg_branch);
       END IF;
    END;
    Hope this works..
    Hamid

  • Filter list items based on security groups o365

    How to filter list items based on security groups in o365.

    Hi,
    According to your description, my understanding is that you want to filter list items based on the Office 365 security groups.
    If that is the case, I suggest you can create a data view to filter the list items with CAML Query like below:
    <Where>
    <Membership Type="CurrentUserGroups">
    <FieldRef Name="VisibleToGroup"/>
    </Membership>
    </Where>
    For more information, please refer the detailed article below:
    SharePoint - Filtering a View by Group Membership
    Thanks
    Best Regards
    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]

  • Want 2 populate value in 2nd list item based on value selected in 1st list?

    Want 2 populate value in 2nd list item based on value selected in 1st list?

    Gaurav -
    The 3rd list will not populate because nothing has been selected yet in list 2. The value in list 2 is null, so the loop to populate list (3) has nothing to load. Try the following below. This should seed your 2nd list so the 3rd list will populate.
    You will have to declare first_record boolean and first_value to match DESCC.
    first_record := true; -- NEW *****
    Clear_List('BLOCK2.ITEM2');
    FOR CurRec IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.IDD = :BLOCK2.ITEM1)
    LOOP
    if first_record = true then -- NEW SECTION *****
    first_value := CurRec.DESCC;
    first_record := false;
    end if;
    Add_List_Element('BLOCK2.ITEM2',1,CurRec.DESCC,CurRec.DESCC);
    END LOOP;
    :block2.item2 := first_value; -- NEW *****
    Clear_List('BLOCK2.ITEM3');
    FOR CurRec2 IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.DESCC = :BLOCK2.ITEM2)
    LOOP
    Add_List_Element('BLOCK2.ITEM3',2,CurRec2.DESCC,CurRec2.DESCC);
    END LOOP;
    My name is Ken, 1990 is when I started using Oracle Forms 3.0, character based in the Unix environments. And you are very welcome.

  • "Item Containing Primary Key Column Value" does not display records

    Hello,
    We are developing a new page where an "Automated Row Fetch" process is needed.
    With other pages we experienced no issues. But with a new one, when defining the value for the field “Item Containing Primary Key Column Value”, Apex displays no rows.
    As far as we know, Apex should display all the fields defined for the page. Is there any property which affects the fields visibility?
    The affected page has textarea and text fields.
    Thanks in advance.

    Hello,
    Sorry, we have already detected that the problem was at field definition.
    Fields should be defined as "Source Type: Database Column". They were wrong defined.
    Thanks.

  • Specifying filename for each list item

    Me again...I'm almost there! 
    When I added the list items, the exportSheets is no longer defined.  I'm assuming the 'if' statements are all screwed up? 
    tell application "Microsoft Excel"
              set xbook to make new workbook
              tell workbook "Retail_Product_Specs.xls"
                        choose from list {"Co-Packer, 10.5oz", "Co-Packer, 32.0oz", "Co-Packer, Elixir"} with title "Exporting Product Specifications" with prompt "Choose Method of Export:"
                        if result is equal to {"Co-Packer, 10.5oz"} then
                                  set exportSheets to every sheet whose name contains "10.5"
                                  set savePath to "Users:KRT:Documents:Sambazon:Production:Finished Product Specs:PDF Documents:Product Specifications:Retail Specifications:10.5oz Whole Food:Spec-WF-10.5oz.xls"
                                  if result is equal to {"Co-Packer, 32.0oz"} then
                                            set exportSheets to every sheet whose name contains "32.0"
                                            set savePath to "Users:KRT:Documents:Sambazon:Production:Finished Product Specs:PDF Documents:Product Specifications:Retail Specifications:32.0oz Whole Food:Spec-WF-32.0oz.xls"
                                            if result is equal to {"Co-Packer, Elixir"} then
                                                      set exportSheets to every sheet whose name contains "Elixir"
                                                      set savePath to "Users:KRT:Documents:Sambazon:Production:Finished Product Specs:PDF Documents:Product Specifications:Retail Specifications:Antioxidant Elixir:Spec-Elixir-11.0oz.xls"
                                            end if
                                  end if
                        end if
              end tell
      copy worksheet exportSheets before sheet "Sheet1" of xbook
              tell active workbook
                        set bounds of first window to {3, 124, 563, 861}
      save workbook as filename savePath
              end tell
    end tell
    I greatly appreciate the help, and hope I'm not a nuisance.  This is my first script so I'm still struggling with the basics. 

    You're if statements aren't correct, As you have them now if the first
    if result is equal to {"Co-Packer, 10.5oz"} then
    doesn't fire none of the following if statements will be evaluated. What you want to do is use
    if condition1 then
         statement1
    else if condition2 then
         statement2
    else if condition3 then
         statement3
    else
         statement4
    end
    So you code becomes:
    if result is equal to {"Co-Packer, 10.5oz"} then
             your code
    else if result is equal to {"Co-Packer, 32.0oz"} then
         your code
    else if result is equal to {"Co-Packer, Elixir"} then
         your code
    end
    Message was edited by: Frank Caggiano - Added example from OP's code

  • Sharepoint 2010 List Item Stored in SQL - column optimalization

    Hi guys,
    I would like to ask you whether you know how are stored, optimalized or recalculated SQL tables where are sharepoint list items stored. I know that sharepoint has the limits how many text, number, boolean and datetimes columns can list item have to be stored
    on one row in SQL table. Let's asume this scenario: I have large list, more than 50 thousand items, and I have more columns in each item, so each item is stored on 3 rows in SQL table. When the list had few items, everything was smooth, now every operation
    with this list take too long so I would like to optimize the list. I can delete some unnecessary columns to satisfy the limits for storing items on one row in SQL table. Will it help to new added items? Will it help to old items which are already stored in
    list and are on 3 rows in SQL? Will be this items recalculated in SQL, or is there any option how can I manage this?? 
    Thanks for your ideas, any help would be appreciated

    Hello, thank you for you answer and interest in my problem. My list, isn't so small, it has about 180 columns and more than 50 000 items. I have taken this project after my friend who doesn't follow list recomandations and everything worked smooth around
    25 000 items, since than is working with the list rapidly slowing down. Now I need to optimize it. Yes i have increased lookup treshold and I know that queries aren't ideal, but I can not optimize them any more. And from your article I have more than 24 DateTime
    fields so I guess I am wrapping it to three lines. So I would like to delete some unnecessary colums at first and try to get to at least two lines, wheather it helps a bit. Dont worry, I wont modify the tables directly in SQL :-)

  • Enable or disable particular record in list item based on a corresponding c

    Hi,
    How can i Enable or disable property of particular record in list item (multi record) based on a corresponding check box(multi record) ,
    e.g Form Structure:
    if press a button then record should populate where multi_post_query
    if my_check_box = 1 then
    my_list_item  disable to update;
    else
    my_list_item  enable to update;
    end if;
    now wanted result is like below
    my_check_box ---- my_list_item
    +----------------------enable
    +----------------------enable
    +----------------------enable
    _----------------------Disable
    _----------------------Disable
    Here "+" means checked,"_" means unchecked and "enable" means updatable "Disable" means not updatable
    the pseudo code is like,
    if my_check_box = 1 then
    my_list_item enable to update;
    else
    my_list_item disable to update;
    end if;
    Note: my_check_box is not updatable
    please tell me which trigger and where I should create
    Thanks
    Edited by: 838602 on Feb 21, 2011 11:12 PM
    Edited by: 838602 on Feb 22, 2011 1:40 AM

    Hi Abdetu,
    I created WHEN-NEW-RECORD-INSTANCE Trigger at data block level
    And I need should work like below pseudo code (sorry for previous pseudo code)
    if my_check_box = 1 then
    my_list_item  disable to update;
    else
    my_list_item  enable to update;
    end if;
    so change code as
    IF :MULTI.PROTECTED_FIELD = 1 THEN
    SET_ITEM_PROPERTY ('MULTI.ACTION',REQUIRED , PROPERTY_FALSE );
    SET_ITEM_PROPERTY('MULTI.ACTION',NAVIGABLE,PROPERTY_FALSE);
    SET_ITEM_PROPERTY ('MULTI.ACTION' ,UPDATE_ALLOWED,PROPERTY_FALSE);
    SET_ITEM_PROPERTY ('MULTI.ACTION' ,INSERT_ALLOWED,PROPERTY_FALSE);
    :multi.action := 0;
    ELSE
    SET_ITEM_PROPERTY ('MULTI.ACTION',REQUIRED , PROPERTY_TRUE);
    SET_ITEM_PROPERTY('MULTI.ACTION',NAVIGABLE,PROPERTY_TRUE);
    SET_ITEM_PROPERTY ('MULTI.ACTION' ,UPDATE_ALLOWED,PROPERTY_TRUE);
    SET_ITEM_PROPERTY ('MULTI.ACTION' ,INSERT_ALLOWED,PROPERTY_TRUE);
    END IF;
    Sorry, still I am not getting desired o/p. even i check item (ACTION) level Trigger
    Note: my_check_box is not updatable
    that would assign at time of button press (post query) as i mentioned
    Edited by: 838602 on Feb 22, 2011 1:41 AM

  • Retrieve list items from the textbox text value and display the dropdownlist item for that particular list item

    hi,
     I have created a custom list in my sharepoint :
    List1 name:   employeedepartment  -
                   Title       empdepartment
                   A             D1
                   B             D2
                   C             D3 
    List2  name:  employeedetails  
     emptitle            empname       empdepartment(lookup) --> from the list "employeedepartment"
       x                     Ram                 D1
       y                     Robert             D2
       z                     Rahim              D3
    My task is to create a custom webpart that will be for searching this employee details by entering emptitle
    For this, i have created a visual webpart using visual studio 2010, my webpart will be like this:
    emptitle  --->  TextBox1                        Button1--> Text property : Search
    empname---> TextBox2
    empdepartment-->  DropDownList1
    For this, i wrote the code as follows:
    protected void Button1_Click(object sender, EventArgs e)
                using (SPSite mysite = new SPSite(SPContext.Current.Site.Url))
                    using (SPWeb myweb = mysite.OpenWeb())
                        SPList mylist = myweb.Lists["employeedetails"];
                        SPQuery query = new SPQuery();
                        query.Query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + TextBox1.Text.ToString() + "</Value></Eq></Where>";
                        SPListItemCollection myitems = mylist.GetItems(query);
                        if (myitems.Count > 0)
                            foreach (SPListItem item in myitems)
                                string a1 = Convert.ToString(item["empname"]);
                                string a2 = Convert.ToString(item["empdepartment"]);
                                TextBox2.Text = a1;           // displaying   properly                    
                                //DropDownList3.SelectedIndex = 1;                           
     It is showing the list item in textbox according to the item entered in the textbox1... But I am stuck to show in the dropdown list. 
    Suppose, if i enter X in textbox and click on search, then dropdownlist need to show D1,
                               for Y --> D2 and for Z-> D3... like that.
    What code do i need to write in the button_click to show this... 
    Please don't give any links...i just want code in continuation to my code.

    Hi,
    Since you have got the data you want with the help of SharePoint Object Model, then you can focus on how to populate values and set an option selected in the Drop Down List.
    With the retrieved data, you can populate them into the Drop Down List firstly, then set a specific option selected.
    Here is a link will show how to populate DropDownList control:
    http://www.dotnetfunda.com/articles/show/30/several-ways-to-populate-dropdownlist-controls
    Another link about select an item in DropDownList:
    http://techbrij.com/select-item-aspdotnet-dropdownlist-programmatically
    Best regards
    Patrick Liang
    TechNet Community Support

Maybe you are looking for