Update a site column dynamically to Approval Status

Hello all this is what I have;
InfoPath form with Form Status field (Form Status promoted to SP form library as site column) form switches to read only view when Form Status = Approved
SharePoint form library set to require content approval
Copied and modified OOB Publishing Approval workflow with Association column, Form Status added,
As it stands, the work flow runs and updates the list item, Form Status, to Approval Status, unfortunately Approval status is set beck to pending (which is correct behavior I assume) I need some help! can I insert the Update list item action in the workflow
task steps? I want Form status to start as pending and then reflect whatever Approval Status value is.  This is my first attempt at modifying an OOB workflow, is this the right approach?
Thanks for any help, I have tried several solutions but I am definately missing something. Should the workflow restart on item change? should I have versioning turned on? all I am trying to accomplish is have the form switch to read only if it's approved and
then if for some reason someone needs to make a change I need Form Status and Approval Status to have the same value.

Hi,
If you only want to approve content, you can enable content approval.
If you want to manage versions, you need to enable content approval first and then enable version.
More information:
Require approval of items in a site list or library
Enable and configure versioning for a list or library
Best Regards,
Linda Li
Linda Li
TechNet Community Support

Similar Messages

  • How can I update a Site Column with the content of an array with javascript CSOM?

    I'm relative new to Sharepoint 2013, I'm trying to update the content of a Site column with the content of an array, I can retrieve and visualize the content of my site column, the user is able to change and save the necessary part and the changes are
    saved into an array, now I have to update the content of the site column with the content of the array, but for some kind of reasons I can't accomplish that, any suggestion/example? This is my code so far to retrieve, visualize the site column and store the
    mofication into my array.
        <body>
                <select id="dropdown" name="dropdown" onchange="optSelect()">
                    <option value="EngineType_Cylinders">EngineType_Cylinders</option>
                    <option value="EngineType_EngineCycle">EngineType_EngineCycle</option>
                    <option value="EngineType_EngineFamily">EngineType_EngineFamily</option>
                    <option value="EngineType_Euro">EngineType_Euro</option>
                    <option value="EngineType_FamilyEvolution">EngineType_FamilyEvolution</option>
                    <option value="EngineType_GasEmissionLevel">EngineType_GasEmissionLevel</option>
                    <option value="EngineType_Power">EngineType_Power</option>
                    <option value="EngineType_PowerSupply">EngineType_PowerSupply</option>
                    <option value="EngineType_Use">EngineType_Use</option>
                </select><br />
                <textarea id="textareadisplay" rows="25" cols="23"></textarea><br />
                <input type ="button" value="Update values" onclick="addItemsToColumns()" />
            </body>
    My Javascript
        $(function () {
            SP.SOD.executeOrDelayUntilScriptLoaded(Function.createDelegate(this, function () {
               var select = document.getElementById('dropdown').value;
                console.log(select);
                getSiteColumns(select);
            }), 'SP.js');
        var fieldChoice;
        var choices;
        var addFields = [];
        var slc;
        var clientContext;
        function optSelect() {
            slc = document.getElementById('dropdown').value;
            getSiteColumns(slc);
        function getSiteColumns(selection) {
           clientContext = SP.ClientContext.get_current();
            if (clientContext != undefined && clientContext != null) {
                var web = clientContext.get_web();
                fieldChoice = clientContext.castTo(web.get_availableFields().getByTitle(selection), SP.FieldChoice);
                clientContext.load(this.fieldChoice);
                clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
        function OnLoadSuccess(sender, args) {
            choices = fieldChoice.get_choices();
            var textarea = document.getElementById("textareadisplay");
            textarea.value = choices.join("\n");
        function OnLoadFailed(sender, args) {
            alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
        function addItemsToColumns() {
            clientC = SP.ClientContext.get_current();
            var arrayForUpdate = $('#textareadisplay').val().split('\n');
            fieldChoice.set_item(, arrayForUpdate);
            fieldChoice.update();
            clientContext.executeQueryAsync(function () { }, function () { });
        function OnUpdateSuccess(sender, args) {
            var newchoices = fieldChoice.get_choices();
    My problem is on the function addItemsToColumns() please help! Thanks in advance.

    Let's look at your stylesheet -
    <style type="text/css">
    body {
    background-image: url(assets/images/Business%20Men%20In%20Reception%20Col.2.jpg);
    background-repeat: no-repeat;
    background-color: #003;
    margin-left:auto;
    margin-right:auto;
    position: relative;
    width: 960px;
    It's a good idea not to use spaces or any punctuation in your filenames when working for the web.
    #header {
    margin-left:auto;
    margin-right:auto;
    position: relative;
    width: 960px;
    #heading {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 36px;
    font-style: italic;
    font-variant: normal;
    margin-left:auto;
    margin-right:auto;
    There's no need to specify the default values (font-variant:normal) or to specify auto margins for any block element without an explicitly defined width. And wouldn't it make more sense to put the font style on the body tag, where it will inherit into the rest of the page than to restate it as you have done in the next rule?
    #bodytext {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 18px;
    line-height: 25px;
    font-variant: normal;
    width: 300px;
    #container {
    width: 960px;
    position: relative;
    margin-left:auto;
    margin-right:auto;
    .rightimg {
    float: right;
    margin-left: auto;
    padding-right: 40px;
    #heading #navbar ul li {
    padding: 30px;
    </style>
    Margin-left:auto can't work without knowing what the width of the element is....  Keep your CSS lean and targeted - it will help you to debug your layouts.

  • Stored procedure Update Statement missing column dynamic creation

    Hi All,
    Here is my scenario. I am having Stored procedure with 5 parameters for particular table. But table schema is having only 3 columns. Is there any way to create 2 missing columns dynamically while Stored Procedure is running?. How can we handle the missing column
    exception. Please help me.
    Thanks,Sakthi
    Thanks and Regards, Sakthi

    Hi All,
    Here is my scenario. I am having Stored procedure with 5 parameters for particular table. But table schema is having only 3 columns. Is there any way to create 2 missing columns dynamically while Stored Procedure is running?. How can we handle the missing column
    exception. Please help me.
    Thanks,Sakthi
    Thanks and Regards, Sakthi
    Very bizarre requirement - surely you meant Temporary Table. 
    For physical table, it would be a good idea to check if column already exists then ADD columns as per Uri Dimant's post.
    if exists(select * from sys.columns
    where Name = N'columnName' and Object_ID = Object_ID(N'tableName'))
    begin
    -- Column Exists
    end
    web: www.ronnierahman.com

  • Upgrade SharePoint Content Types / Site Columns declaratively in SharePoint hosted apps

    Hi!
    I have a question where I was unable to find any official guidance for. I have created a SharePoint hosted APP where I have multiple site columns and content types (declared in XML). The APP installs and functions just fine. 
    Now I have a requirement to change a site column (Choice field, just add some more choice values). I was able to update the site column but the changes will not be reflected on the list column (I think because there no way to push the changes).
    So is there an "official" way of changing site columns?
    Any help is appreciated!
    Thx!

    msdn -
    How to: Update app web components in SharePoint 2013 :
    We do not support changing the data type of a list or content type field (column) after its initial deployment in any
    circumstance. In particular, do not change the data type of a field as part of an app update (not
    even programmatically). As an alternative, you can add a new field. If the app includes custom item create, edit,
    or view forms; be sure to make corresponding changes in these forms. For example, add UI for the new field and remove UI for the old one. (In a provider-hosted app, you can programmatically move data from the old field to the new one and then delete the old.
    How to: Update apps for SharePoint
    [custom.development]

  • Update Approval Status of parent Folder based on approval status of folder items

    Hi,
    I have a SharePoint list which contains folders. Each folder contains one or more items. I wish to update the folder approval status to "Approved" when all the items inside the folder are approved.
    The workflow should trigger whenever the approval status of one or more items inside the folder is changed and is expected to check the approval status of all other items inside the folder. If all the items are approved the folder's approval status should
    be set to "approved".
    I am designing the workflow via SharePoint Designer 2013 and using SharePoint Online 2013 .
    Thanks a lot in advance.

    Hi,
    According to your post, my understanding is that you wanted to update Approval Status of parent Folder based on approval status of folder items.
    Per my knowledge,
    there is no out of the box way to accomplish this with SharePoint.
    Though we can loop the
    folder items to set the content approval status, we can not get the parent folder and then set the content approval status.
    As a workaround, I recoemend to create event reciever to get set the content approval status of the folder items.
    For more information, you can refer to:
    How to: Create a remote event receiver
    How to create a simple Remote Event Receiver for a Custom List in Office 365 SharePoint 2013 site
    Regarding SharePoint Online, for quick and accurate answers to your questions, it is recommended that you initial a new thread in Office 365 forum.
    Office 365 forum
    http://community.office365.com/en-us/forums/default.aspx
    Thanks,
    Linda Li                
    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]
    Linda Li
    TechNet Community Support

  • Approval Workflow does not update the Content Approval status if started automatically

    Hi,
    I’m using a simple Approval Workflow associated with
    Content Approval on site pages. It works fine when I set it to be started manually (by using
    Allow this workflow to be manually started by an authenticated user with Edit Item permissions
     option) and on the completion of the workflow the
    Content Approval status is updated accordingly. But when I set it to be started automatically (by using
    Start this workflow when a new item is created
     / Start this workflow when an item is changed
    options), it does not updates the Content Approval status. Note that I’ve set the
    Update the approval status after the workflow is completed (use this workflow to control content approval)
    option to true.
    Regards

    Hello,
    It is recommended to select "Start this workflow to approve publishing a major version of an item" when you want to use the workflow to manage content approval for
    a library.
    According to the Notes for “Enable Content Approval” option in
    this reference:
    If you are using this Approval workflow to manage content approval (moderation) for a library, and you selected the Start this workflow to approve publishing a major version
    of an item check box on the Add a Workflow page..
    If you did not select the Start this workflow to approve publishing a major version of an item check box on the Add a Workflow page because you do not want this workflow to
    be the default content approval workflow for a library, you can select the Update the approval status (use this workflow to control content approval) check box to make this workflow a secondary content approval workflow that specific users can
    start manually.
    That means having an approval workflow start automatically when a document is changed or created is not a good practice when you want to use the workflow to manage
    content approval for a library. You should either select "Start this workflow to approve publishing a major version of an item" or give users the option to start the workflow manually at the time they want to submit for an approval.
    Thanks & Regards.
    Lily Wu

  • Update form library approval status from pending to approved on multiple records

    Hi all, currently I have 508 records (forms) with the approval status set to Pending, I have an approval work flow but I turned it off to get these records in (Long story).
    Can I use an SP designer work flow to update all the values in the form library? I don't want to start a workflow on each item.
    Thanks for any help

    Hi rixmcx59,
    According to your description, my understanding is that you want to use a workflow to update all item in SharePoint 2013.
    To achieve it, you can use Loop action to loop all items , and update them.
    More information, please refer to the link:
    http://blog-sharepoint.blogspot.com/2010/01/sharepoint-looping-workflow-how-to-loop.html
    Here is a similar post for you to take a look at:
    http://social.msdn.microsoft.com/Forums/en-US/d374427d-ee11-4a49-b405-23e68f3c3eaa/how-to-loop-through-another-list-and-update-a-column-with-sharepoint-designer-2013-workflow?forum=sharepointcustomization
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • OOTB Approval Workflow on Custom List does not Update Approval Status

    I have a custom list on which I've required content approval.  I then created a workflow instance from the "Approval - SharePoint 2010" template.  For this workflow I have selected "Update the approval status after the workflow
    is completed (use this workflow to control content approval".  When I approve the list item via the workflow task item the status of the item is not updated but stays at pending even though the
    workflow shows "Completed" with the Outcome of "approved".  Is this the expected behavior, i.e. does "Update the approval status after the workflow is completed (use this workflow to control content approval"
    not work for custom lists?  Does it work on any of the lists?

    Hi Kalos1840,
    If you check "Require Content Approval" setting, only the way above can update the approval status due to the approval status is for this approval workflow. As this approval workflow cannot achieve your demand, I recommend you un-check "Require Content Approval"
    setting and create a custom workflow such as the OOTB Approval Workflow or SharePoint Designer workflow.
    Here is the steps of a SharePoint Designer workflow:
    1.Go to your custom list , click Create a Workflow in SharePoint Designer.
    2.Add a “Start a task process” action in your workflow.
    3.Click “these users” and Start a Task Process edit page will pop up.
    4.In the Participants field, input your  approvers based on the order of approval.
    5.In the right of Participants field, select “Serial (one at a time)”.
    Best  Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Can you update Approval Status in Sales order using DI API using SDK

    Hi experts,
    Can we actually update the Approval Status(WddStatus) in Sales order From approved to pending using DI API.
    Thanks,
    John

    Hi John,
    When the sales order is originally created, and at that point pending approval, it is stored as a draft. Once approved, a sales order is created based on the draft.
    In other words, the pending document and the approved document are two entirely separate objects in the database (they use different tables), and in the SDK.
    That means that you can certainly realize your requirement, but you will have to look at it from another perspective. In quasi code:
    Intercept the update event
    Check if any changes were made that warrant another approval round
    If so, duplicate the (adjusted) order, and submit the new order to trigger the new approval round.
    Close or cancel the original order.
    Admittedly this seems a bit silly, but unfortunately the approval process in B1 is still not perfect. As such I recommend that you (also) log on to the SAP Business One Idea Place, (it is free, like the SCN) and vote for any ideas that pertain to your requirement, and/or create an idea of your own.
    Another approach all together could be to instruct users not to make changes to orders, and to use the stored procedure to prevent updates. And allowing users to only submit a new order altogether (they can use the duplicate functionality).
    Regards,
    Johan

  • Invoice Approval Status Table/Column in AP (R12)

    Hi,
    I need to add Invoice Approval Status column to AP Trial Balance report in (R12).
    Please let me know which table has this information.
    Also, i need to add another field where:
    If Invoice Approval Status <> Approved, then what is the name of the person which we are waiting approval (Last Name, First Name)
    Could you let me know this information.
    Thanks
    Pravin

    Hi Kashif,
    Thanks for your response.
    For the Invoice Approver question:-
    Ques:- if the Invoice is Not-Approved (or) if it needs Re-approval, If Invoice Approval Status <> Approved, then what is the name of the person which we are waiting for approval..
    As you said the ap_wfapproval_history_v table , I'm not sure whether this table has history data (or) can i get Next Approver from this table.
    I tried to do in this scenario :- For one invoice_id which needs Re-approval, when i looked into ap_wfapproval_history_v table with this invoice_id there are 4 Approver names ,against each of these approvers the Response column shows either SENT or APPROVED. So, how will i know by which Approver this Invoice needs
    Re-Approval.
    please could you clarify.
    Thanks
    Pravin
    Edited by: 855902 on Oct 9, 2011 8:28 AM
    Edited by: 855902 on Oct 9, 2011 8:34 AM
    Edited by: 855902 on Oct 9, 2011 8:36 AM

  • Rename approval status column

    Hi,
    Is it possible to rename the approval status column to something else? The approval status column is added when you tick the manage content approval check box under advance setttings under document library.
    Thanks

    Yes, I see that you are correct. The Approval Status column is not available on this list. To edit the display name, you can do the following:
    Edit one of the columns, other than the Title column (e.g. "Created by")
    In the address bar, go to the end. You will see the name of the column (e.g. For created by you see: &Field=Author)
    Change the column name to "Approval%20Status" (e.g. &Field=Approval%20Status). Hit Enter
    The Change column page should load. Change the column name as needed. Click OK.
    Jason Warren
    Infrastructure Specialist
    Habanero Consulting Group
    habaneroconsulting.com/blog

  • Leave with approval status ''Work in progress''

    Hi,
    I try to delete or complete the leave with approval status ''Work in progress'' and there is no way to do that .. can anybody help .
    This issue happened when i request annual leave and the session expired .. i login again and i found the request stuck at absence summary and i can't do any thing even deleting.
    snapshot of the issue:
    http://www.2shared.com/photo/B2F8Aysg/work_in_progress_leave.html
    Thanks in advance

    Hi,
    Yes i know its not should be disabled at site level i did that on test envroment .
    i tried to put it at user but its not possible
    after i put the profile on value 'Yes' the delete and update columns appeared at absence summary with warning massege and i can delete the Leave with approval status ''Work in progress'':
    http://www.2shared.com/photo/QqRfjReY/Warning_mass-2.html
    and when i try to create new leave gave this error massege:
    http://www.2shared.com/photo/LL1sU9xB/Warning_mass-1.html
    can you guide me how can i know the earlier personalization done on the absence page ??
    thaks alot for your helping

  • Creating a new Column for my list Versus adding it from existing site columns, when to use each approach

    I have created a new issue tracking list inside SharePoint 2013 team site. And it comes with predefined columns, some of them are useful while the other are not . Can anyone help me in figuring out the following:-
    The list come with a field named “Assigned To”, while in my case I want a column named “Approver”. So what is preferred , to re-name the “Assumed to ”column to “Approver”, or create new field name “Approver”.?.
    If I rename an existing column, could this be overridden in any future updates for my SharePoint server?
    Now we want to add a column named “Office location”.so I need to create a new field for this. But seems there are two ways to do so either to add a new Site Column at the site level and then assign it to the list as follow :- 
    , or to directly adding a column to the list, even if it is not available in the site columns , as follow:-
    So what are the differences between the two approaches ? .if I am not wrong defining a site column will allow me to re-use it in another list , but defining the column at the list level, will allow me to add a column even if it is already defined as site
    column.
    So can anyone advice on my three questions please? Thanks

    1) 'Assigned to' has a different meaning then 'Approver' , it will be better if you create a new field for 'Approver'. Assigned to is a Site Column which has managed property for search, so it will be confusing type of data it will return from search in
    future. 
    2) Any rename of fields should not / and will not get modified in SharePoint updates. So, you can rename is without any issue since the internal name will remain the same. But its always better to create your own custom column for business use.
    3) Creating a site column or not depends upon your need, If you create a Site Column - in whole site collection you will be able to add this field in any list - It will be crawled, SharePoint will automatically provide managed property for site column and
    you will be able to get this value via search. These things will not be present in list column, you will need to do specific settings in case its required.
    If these things are needed then you can go for Site Column, usually its good to create a Site Column and use it.
    For Site Columns you can check following links 
    Introduction to Columns
    From site column to managed property - What's up with that?
    Create a site column
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.
    thanks a lot for your reply it is really helpful. so as i understand that using site columns will be better in most cases, and there is not any specific reason for not using it? is this right ?
    Second question, do u mean that if i have a list column named "Serial number", then this column will not be searched ? For example if i have serial number such as "12345" and i try searching this text "12345" i will not get
    the item in my search ?
    Thanks

  • Filter for custom added site columns using rest

    Hi everybody,
    I'm trying to filter a REST Response by a custom added site column.
    when i'm using the endpoint lists() with /Items the filter works great:
    site/_api/Web/Lists(guid'805e17b0-2728-4b30-a889-a7e8f025696b')/items?$filter=astringcolumn%20eq%20%27dfg%20-----------------------------%27
    but when I'm trying to filter using
    site/_api/Web/GetFolderByServerRelativeUrl('/sites/DennisDevSite/alib')/Files?$filter=astringcolumn%20eq%20%27dfg%20-----------------------------%27
    I get a response that states Field or property "astringcolumn" does not exist.
    event if I add &$select=astringcolumn&$expand=astringcolumn to the url the same error is returned
    Why does the first work and the second does not?
    Thx in advance
    Dennis
    P.S.: sorry: I also posted this question in the sharepoint 2013 apps forums. but I think it's better to post it here

    Hi Dennis,
    Steve as mentioned the reason this happens. You may try any of the following workarounds:
    Get the files using Files Rest endpoint and then perform the filteration in the success handler based on the custom column. The Rest query needs to include ListItemAllFields. Example: site/_api/Web/GetFolderByServerRelativeUrl('/sites/DennisDevSite/alib')Files?$expand=ListItemAllFields
    Note that you cannot use filter in the Url.  
    The other option is to use CAML Query Payload, but that can only be used with getitems REST endpoint. However, this will return the ListItem corresponding to the file. It wont be a file object. Example:
    function getListItems(viewXml)
    var url = "http://aissp2013/_api/web/lists/getbytitle('Management Documents')/getitems";
    var queryPayload = {
    'query' : {
    '__metadata': { 'type': 'SP.CamlQuery' },
    'ViewXml' : viewXml,
    'FolderServerRelativeUrl': '/ManagementDocuments/F1'
    return $.ajax({
    url: url,
    method: "POST",
    data: JSON.stringify(queryPayload),
    headers: {
    "X-RequestDigest": $("#__REQUESTDIGEST").val(),
    "Accept": "application/json; odata=verbose",
    "content-type": "application/json; odata=verbose"
    var query = "<View><Query><Where><Eq><FieldRef Name='Location' /><Value Type='Text'>Srinagar</Value></Eq></Where></Query></View>";
    getListItems(query)
    .done(function(data)
    console.log(data);
    .fail(
    function(error){
    console.log('Error');
    Still, the other option is to use old fashioned ListData.svc. It will allow filter in the url and will also return some file properties like Name, approval status, version etc along with all custom properties. Example:
    http://aissp2013/_vti_bin/ListData.svc/ManagementDocuments/?$filter=Path eq '/ManagementDocuments/F1' and Location eq 'Srinagar'
    Please remember to up-vote or mark the reply as answer if you find it helpful.

  • Approval status after copying sharepoint issue (help friend)

    Re !
    It's surely easy...I gonna try to be clear :)
    In sharepoint I got 2 lists : list01 and list02
    On my list01 I have a workflow.
    In the list01, if the approval status of my item is "approved" then I copy the item in list02.
    My problem is : 
    the copied item in my list02 (yet "approved" in list01) have a approval status "waiting for approval"
    Strange ?
    How to keep it "approved" ? What I do not do well ? I have to change my workflow on list01 ? Create a workflow on list02 ? Settings/configure on my list02 ?
    I don't understand this behavior.
    Thank you for reading.
    Regards

    Hi,
    The approval status column is a system column, it cannot be copied by workflow.
    You can click approve/reject button in the ribbon to approve or reject the new item in list02 manually.
    Or you could change the approval status from “waiting for approval” to “approved” by code in the list02.
    The article below is about how to update the content approval status column.
    https://chanakyajayabalan.wordpress.com/2013/03/01/read-or-update-content-approval-status-column-or-moderation-column-using-sharepoint-client-side-object-modelcsom/
    Best regards,
    Sara Fan
    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]

Maybe you are looking for