Get approval status in edit form

Is there an easy way to retrieve item approval status (moderationStatus) inside the edit form? During display of edit form I need to know wheather the currently edited item was approved or not. I see that the information is not reflected in a hidden column
or else. I have the following ideas:
Custom flag column that indicates if the item was approved.
Get the current item via js rest call and check OData__ModerationStatus.
I just want to know if there is an easier way to get the moderationStatus of the item I am editing.
Thank you!

Hi Eng,
As we all know, the approval status column is a hidden column in SharePoint and it cannot be edited manually, so there is no OOB way to display the column value in item edit form.
The easiest way is to use code to get the current item and then display the _ModerationStatus value in your Edit Item form.
Here is the code example:
<script language="javascript" type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(runCode, 'sp.js');
function runCode() {
var value1=window.location.href.indexOf("?")+4;
var value2=window.location.href.indexOf("&");
var url=window.location.href;
var itemId=url.substring(value1,value2);
var clientContext = new SP.ClientContext();
var targetList = clientContext.get_web().get_lists().getByTitle('Case Date');
targetListItem = targetList.getItemById(itemId);
clientContext.load(targetListItem, '_ModerationStatus');
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
function onQuerySucceeded() {
var status=targetListItem.get_item('_ModerationStatus');
switch(status) {
case 0:
alert("Approved");
break;
case 1:
alert("Rejected");
break;
case 2:
alert("Pending");
break;
case 3:
alert("Draft");
break;
function onQueryFailed(sender, args) {
alert('Request failed. \nError: ' + args.get_message() + '\nStackTrace: ' + args.get_stackTrace());
</script>
You can also take a look at the link below about changing the Approval Status column in Edit item form:
http://www.codeproject.com/Articles/718575/Change-of-Approval-Status-in-SharePoint-Edit-Form
Best regards.
Thanks
Victoria Xia
TechNet Community Support

Similar Messages

  • Triggering a scheduled event based on the approval status

    Hi,
    I have created schedules for my project (one task and one milestone) with three phases(draft,approval,approved). The milestone is dependent on the task.Task is created for draft phase and milastone for approval phase
    Now after creating the schedules when I have saved the project, even before i put my project in the draft phase the schedule is getting triggered and can be seen on the workbench in the events channel.
    That means the schedules are getting triggered based on the date irrespective of the task or milestone being completed and also the schedule for a task needs to be triggered each time until the task is completed.
    So now I want accomplish two things -
    1. How can I trigger the schedule only when the user puts it in the draft phase or any required phase ?
    2. How can I send a mail to the collaborator each day until he proceed the project to approved status and only on getting "approved" status the milestone schedule should be triggered.

    Both would require scripting...
    on phase change, add the required events
    build a custom class that gets called nightly via scheduled task and searches through the projects meeting your criteria and sends them an email reminder.
    -Howie Wexler
    www.craftysystems.com

  • 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

  • SharePoint Designer 2010 Error occurs when accessing Edit Form: "The server returned a non-specific error when trying to get data from the data source ..." This occurs when using "" in a calculated column in a SharePoint List

    I created a calculated column "Expiration Date" in SharePoint 2010 with formula, =IF([Contingent Hire]=TRUE,(Created+90),(IF([Contingent Hire]=FALSE," ")))
    This works in the SharePoint list but when I go to edit the Edit Form in Designer. I get the error specified in the title of this post. I'm trying to make it so the Expiration Date is blank when another column, "Contingent Hire" (a YES/No
    column) is FALSE.
    The Edit Form is essentially a DataViewWebpart. If I remove the " ", like so, "(IF([Contingent Hire]=FALSE,))" from the calc column, the error goes away; however, the Expiration Date field does not
    remain blank like I want it to.
    Does anyone have any suggestions? (Below is the error generated when I open Designer and then try to open the Edit form for the corresponding list containing the calc column)
    JackSki123

    Hi Jack,
    Could you provide a screenshot about this issue?
    As Dimitri suggested, you can install the update for your SharePoint Designer and check again.
    And you can also check if you can display "NA" instead of " " in your calculated column per the following post.
    http://rajeshspillai.blogspot.in/2012/03/server-returned-non-specific-error-when.html
    Thanks
    Daniel Yang
    TechNet Community Support

  • Failed to get value of the "Attachments" column after my Edit Form customization in share point 2010

    Hi,
    I am trying to customize the Edit Form in sharepoint 2010 .After my customization when i click on save it is giving below error.
    Failed
    to get value of the "Attachments" column from the "Attachments" field type control.  See details in log. Exception message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) "
    Every thing works fine if i  uncheck the Attachments property of the custom list.But i would need user to allow add attachments to the list.Could you
    help me to resolve  this issue.

    Hi,
    It would be better if you could provide the steps in details about how you customize your Edit Form.
    Anyway, you can take a look at the similar thread below, there is someone stuck with the similar issue before:
    http://social.technet.microsoft.com/Forums/en-US/d60e2a8e-575d-4b3c-959f-2a6a2b1364cf/failed-to-get-value-of-the-attachments-column?forum=sharepointcustomizationlegacy
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Iam getting PO approval status as incomplete

    Hi,
    Can anyone please guide me in getting po approval status as approved.Iam a beginner in oracle apps.Is there anything to be done with oracle workflow related to po approval for getting the PO status as approved. Iam getting the notification in notification summary.but the approved notification in notification summary is not changing to approved status in navigation->po/po.
    Latha

    Hi JayaChandra,
    Even I am facing the same problem. I Created a 'PO Requsition' .It is Approved and after that I am 'Auto Creating' a PO from the 'Requisition' approved .
    But I am unable to approve the PO that is created.I am approving by myself and I am not forwarding it.The Status is showing 'InComplete'. But I am Able to Approve a 'Manual PO' but unable to approve 'Auto Create PO'. I dont know the problem and the approval limits are set properly.
    Thanks in Advance,
    D.V.Narasimha Rao

  • ADF- search get the value back to the edit form

    I am trying to do a search on one inputtext field from an Edit frm. After the selection in the search dialog page, when I set the value back to the edit form it does not set like a value. it sets like an object.
    the value of the field comes like - view.managedbean.myBean@5571b0
    It should have been "333164"
    I have followed the following link in doing this -http://www.oracle.com/technology/pub/articles/gauchman-lov.html
    the code for the searchbean and the edit bean are as follows
    //on the serachbean
    public void returnObject(ActionEvent actionEvent) {
    JUCtrlValueBindingRef selectedRowData= (JUCtrlValueBindingRef)getSearchResultsTable().getSelectedRowData();
    if (selectedRowData==null){
    AdfFacesContext.getCurrentInstance().returnFromDialog(null,null);
    return;
    // Get JobTitle and Salary of selectedRow
    oracle.jbo.domain.Number oracleJbosearchID = (oracle.jbo.domain.Number)selectedRowData.getRow().getAttribute("myId");
    myID = new Integer(oracleJbosearchID.bigIntegerValue().intValue());
    setMyID(myID);
    AdfFacesContext.getCurrentInstance().returnFromDialog(this,null);
    //on the edit bean
    public void handleReturn(ReturnEvent returnEvent) {
    MyBean myBean = (MyBean)returnEvent.getReturnValue();
    if (myBean==null)return;
    Integer myID = myBean.getMyID();
    getMyID().setSubmittedValue(null);
    getMyID().setValue(myID);
    AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    afContext.addPartialTarget(getMyID());
    Any help would be appreciated
    Thanks

    Hi,
    the following line
    AdfFacesContext.getCurrentInstance().returnFromDialog(this,null);
    returns an instance of the managed bean, which for the example of a return value is an overkill to do. Please have a look at
    http://download-uk.oracle.com/docs/html/B25947_01/web_complex003.htm#CEGDHIGB
    for how to use dialogs. It explains how to return an simple object and how to return a collection (e.g. in a Hashmap)
    Frank

  • What's the WMI class name to get Client Approval status

    What's the WMI class name to get Client Approval status.
    Unfortunately the below example with class "SMS_R_System" does not have the approval status
    Get-WmiObject -Namespace "root\sms\site_LAB" -Class SMS_R_System | fl *
    I listed all the available classes and... yeah It's going to take along time to go though all the possibilities.
    Note: I'm running this in powershell on the primary first
    If anyone knows it... I'd appreciate your help

    This is all still in the testing phase so I'm not sure this is the best solution... but here's my problem and idea to resolve it.
    Currently in our environment OSD can only be run against unknown computers and approved clients.
    I currently automatically approve all clients in a trusted domain. So all systems that succeed OSD and auto join the domain are approved and I can always run OSD against those machines in the future.
    Problem is with the systems that fail OSD for any reason and therefore do not automatically join the domain. They end up getting a SCCM record by the name of "Unknown" and therefore cannot run OSD again until the "Unknown" record
    is deleted. "Unknown" records happen too frequently to manually delete and I'm not too comfortable with just deleting ALL of them on a scheduled basis.
    Additionally there are way too many OU's in my environment to automatically join our OSD'd systems to the domain. So I have a script that checks using a prestart command to see if the system is already in AD, and if so then OSD continues and simply
    joins the machine to the domain in it's current OU. If not the tech is given a nasty error message telling them to add the computer object in AD in the proper OU first.
    I intend to check , with a Prestart Command if the current system already has a record in SCCM and delete it if found AND is not approved yet. This should resolve the "There are no task sequences available" error I get with
    systems that have an "Unknown" SCCM record.
    In this way the system will be essentially approved if the system was already prestaged in AD manually by a technician and any "unknown" record for that system will simply be deleted at the point of OSD.
    Note: Although I can easily use the new SCCM Powershell cmdlettts and get the "Approved" status, I need to do all of this in WinPE without the cmdletts. If this property is not available via WMI, then I'm guessing this will not work.

  • SP2010 Designer workflow "Set Content Approval Status" does not work

    Hello
    I'm having a problem with a workflow for one of my clients.It is a SharePoint 2010 environment and I can only use SharePoint 2010 designer (no visual studio).
    We have an approval workflow in place, which works great. After the document approval workflow has does its thing, a new workflow can be launged by specific users (they have writing rights and can approve content). The workflow is used to set the release
    date of the document. This can only be determined after content approval.
    However, when the release date is set, the document approval status is changed to concept. This is of course to be expected, as we changed to document metadata. That is why I wanted to add the action "Set content approval" to this workflow. I cannot
    seem to get this action to work. Right now the workflow does the following:
    check out the document (check out is obligatory in our library)
    set the release date field to the released date parameter (defined when starting the workflow)
    check in the document
    set content approval to approved.
    The release date gets set to the parameter value, but the document is not checked in and the content approval status is not set. SharePoint produces the following error message (translated from Dutch): "An error occured. Cannot edit the item, possibly
    because one or more columns require another type of content. Unknown error."
    Guided by other posts online I gathered that this might be because the actions checkin and set content approval occur to close together. I tried letting the workflow pause for the duration of 1 minute after checking in, but this pauses the workflow indefinitely.
    I then tried 5 minutes (as this is the time standard set by SP2010 designer) but this also resulted in indefinite pausing.
    Posts online lead me to believe that I'm not the only suffering from this problem, but as of yet, I haven't been able to find a solution that works for me. Hopefully someone can help me.

    Hi,
    According to your post, my understanding is that the "Set Content Approval Status" didn’t work in SharePoint 2010 Designer workflow.
    I try to reproduce the issue and the result is the same as yours.
    If I only check out and check in the item, the workflow works well.
    However, once I set Content Approval Status after checking in the item, the workflow get error.
    As a workaround, I recommend to use two workflow to achieve what you want.
    First, create the first workflow, and allow the workflow to be manually started.
    Then, create the second workflow, and
    start the workflow automatically when an item is changed.
    When you start the first workflow, the document will be set value of the release date. And then the second workflow will be started automatically to set the content approval status.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Calendar component in CQ 5.5, "Recursive invocation. Not further handling status 404(No form found)"

    Hi,
    we have upgraded our CQ 5.4 installation to CQ 5.5. After the upgrade, we are facing an error with the Calendar component. The following error is logged when trying to create a new calendar event:
    20.11.2012 11:01:23.139 *ERROR* [10.62.45.10 [1353405682764] POST /content/hm/NewsroomSection/en/NewsRoom/test/_jcr_content/par/calendar_3dd7/calendars/def ault/2012/11/22/.form.create.html/libs/collab/calendar/content/eventform HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver handleError: Recursive invocation. Not further handling status 404(No form found)
    We will try increasing the log level to possibly get a more detailed error message, just checking if anyone has encountered this issue?
    Thanks,
    Joakim

    "No form found" means the form chooser that's used here ("form" selector) to find the form to show/edit the event did not find one under the given path /libs/collab/cale ndar/content/eventform (the suffix). It contains a space, maybe it's just a typo.

  • Get Approval Group by pass item or its category

    We make Approval Group based on item category for PR or PO approval. The question is , i want to get approval group based on item or its category. Just pass item id and get which approval group is going to approval this item.
    i got po_control_rules table it just contains categories range in description form, but didn't get any proper help.
    Pl suggest solution
    Regards,
    Edited by: user9092987 on Apr 14, 2011 6:35 AM

    Shaukat,
    First do select category_id from mtl_item_categories using inventory_item_id.
    You may get multiple records back. In that case, use the category_set_id to narrow down to the record that is applicable.
    Then select the category segments from mtl_categories using the category_id.
    Then compare the segments with the segment fields in po_control_rules to identify the correct approval group.
    Hope this answers your question,
    Sandeep Gandhi

  • Shoppin cart getting approve after rejection in BADI WF

    Hi all,
    I am using Item level SC Approval WF WS1450000015.
    When The SC is being rejected its getting approved. And the Status at the header level is coming as approved and item level atatus is Rejected.
    Has anybody else has faced this prob?
    Any suggestion will help.
    No body got this bugg??
    Regards,
    Edited by: Rahul Azi on May 30, 2008 8:18 PM

    Hi Raj,
    > can you tell me the steps to investigate the agent determination and mail send function in workflow.
    Check the Following Links:-
    /people/sapna.modi/blog/2007/02/19/workflows-for-dummies--introductionpart-i
    http://help.sap.com/saphelp_nw04/helpdata/en/9b/572614f6ca11d1952e0000e82dec10/frameset.htm
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/workflow%252bscenario
    http://****************/Tutorials/Workflow/Workflow.htm
    Regards,
    Kanika..:-)

  • 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

  • How to get invoice status columns available in invoice general screen

    Dear All,
    How to get invoice status in oracle invoices
    Invoice Status --> Validated, Never Validated, Cancelled etc
    please advice me.
    Thanks
    Rehan
    Edited by: 877432 on Oct 9, 2012 3:52 AM

    for
    >
    which is not giving this function kindly where i find these status.
    >
    re-read
    >
    plz see http://www.shareoracleapps.com/2010/10/api-to-find-ap-invoice-status.html
    also Where Is The Invoice Validation Status Stored? How Is The Invoice Validation Status Determined? [ID 301806.1]
    >
    those notes point about statuses - 'Validated' , 'Never Validated' , 'Needs Revalidation'
    if you want 'Unpaid' , 'Fully Applied','Available' etc instead of 'UNPAID', 'FULL', 'AVAILABLE' etc you can use lookups
    see note in http://andyblg.wordpress.com/2012/10/09/approval-status-for-invoice-in-r12/

  • Load Dropdownlist with share point groups in Edit Form of workflow List

    Hi ,
      I have created a created a workflow for template approval process  when i edit the workflow task ,i would need to show 
    two drop down list 
    Memeber Group :Load sharepoint groups
    Assigned to :Display members from selected group.
    Could you tell  me how to implement this.
    Regards,
    .Net User

    Hi .Net User,
    Based on your description, do you mean that you want to show two drop down lists in the workflow tasks list’s edit form?
    And, do you want to display all the SharePoint Groups and all the members in the specific SharePoint Group that you select from the Group drop down list?
    Per my knowledge, we can add two new Task Form Fields to display the “Assigned To” column’s value of the current task, and the Approval Task Process’s Participant Groups, however, we cannot get all the SharePoint Groups in the workflow tasks list’s edit
    form using SharePoint Designer 2010.
    To implement it, please follow the steps as below.
    Click on the “Approval” of the action in the workflow, add two new Task Form Fields named “Assigned To Member”, “Member Group” with “Single line of text” type.
    Click on “Change the behavior of a single task” in the “Customization”, add two “Set Task Field” actions in “Before a Task is Assigned” section as below:
          Set Task Field ““Assigned To Member” to “Current Task: Assigned To” with “Display Name”, Set Task Field “Member Group” to “Task Process: Participant List” with “Display Names, Semicolon Delimited”.
      3.  Publish the workflow and test if it works in your environment.
    Then, the result is shown as below:
    Best Regards,
    Yumi Fu

Maybe you are looking for

  • OAS 10G Forms and Reports Forms - Removing old sessions

    I am currently running Oracle Application Server 10.1.2.0.2 Forms and Reports Services Install.The problem that I am experiencing is that some users don't log out of our application and after 8 hours of inactivity our DB logs the users out of Oracle.

  • Multi SSID problem, not work

    hi I bought a Cisco WRVS4400n to use with different vlan and ssid, I use a Cisco Catalyst behind my new WRV, on sigle ssid mode and without Vlans configured, worked perfectly, but, on trunking mode with multi ssid on different vlans ( to use public a

  • Minimum security level

    Does anyone know where can I find spec for Minimum security level (both DRM and Runtime). These are entries I need to specify in policy file, but I can't find guidlines/spec for these. THanks!!

  • Why can't I easily manually sync podcasts?

    Just switched from Dell/Windows to a Mini Mac.  Used to be able to easily drag podcasts from my PC to my Iphone.  Now when I do so, many podcasts alrady on my phone are erased.  Why is a Apple to Apple transactio harder than an Iphone to Dell transac

  • ¿Cómo pasar la música de mi ipod a iTunes?

    Sucede que recientemente tuve que formatear mi computadora y toda la música de itunes se borró pero sigue en mi ipod y no sé como pasar la música del ipod a itunes. ¿como puedo transferirla?