Updating approved list
Cheers,,,
Please have a look at following:
Approved LIst
1
2
3
4
Waiting List
1-2 > 5-11 //approved as 1 & 2 are in approved list
1-3 > 6 // approved
1-3-2 >7 // approved
1-10-3>8 // NOT approved 10 not present
Updated approved list
1
2
3
4
5
6
7
11 //careful
Any fine way to solve this problem?
This problem might make use of ArrayList, StringTokenizer, Collection
//this code is just to get an idea...
for(int i = 0; i < approvalListno.size(); i++) {
if((approvalList.get(i)).checkApprovedList(approvedList)) {
found += i+"-";
StringTokenizer tok = new StringTokenizer(found,"-");
while(tok.hasMoreTokens())
no = Integer.parseInt(tok.nextToken());
for(int m = 0; m < approvalList.get(no).getNumWaitingApproval(); m++) {
String check = rules.get(no).getApprovedWaiting(m);
if( !approved.contains(check))
approved.add(approvalList.get(no).getWaitingApproval(m).trim());
<LEGHORN>I say, I say, I say .... speeak plainly Boy!</LEGHORN>
Similar Messages
-
Trying to follow Serge Luca's Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and MOSS2007. http://sergeluca.spaces.live.com/blog/cns!E8A06D5F2F585013!859.entry
I have an onWorkflowActivated, followed by an ifElse condition and a log to history.
In the IfElse, each branch has a code segment, that trys to update the status column in the list that the workflow is attached to.
private void Authorize_ExecuteCode(object sender, EventArgs e)
// tried serveral methods
WorkflowProperties.Item["Status"] = "Automatically Approved";
// tried all of the following (one at a time)
item.update();
WorkflowProperties.Item.Update();
WorkflowProperties.Item.SystemUpdate();
//tried this as well.
Microsoft.SharePoint.SPListItem item = WorkflowProperties.Item;
item["Status"] = "Automatically Approved";
item.Update() ;
On the update call I keep getting "Invalid data has been used to update the list item. The field you are trying to update may be read only."
Could someone explain how to update "Status" column of the list item that the workflow is working on?
Thank you very much.
Bill
Hi:
you can do the following:
add the following code to the workflow.xml file (under the MetaData section)
Code Snippet
<ExtendedStatusColumnValues>
<StatusColumnValue>Branch1</StatusColumnValue>
<StatusColumnValue>Branch2</StatusColumnValue>
</ExtendedStatusColumnValues>
then add 2 SetState activities one in each branch of the IfElse.
for the code behind of setState1 (branch1) write the following code:
Code Snippet
state = Convert.ToInt32(SPWorkflowStatus.Max);
for setState2 (branch2) write the following:
Code Snippet
state = Convert.ToInt32(SPWorkflowStatus.Max) + 1;
where state is the variable assigned to the field State in the properties of the SetState(design lever), or instead of state u can use the following code:
Code Snippet
((SetState)sender).State
where sender is the object sent through the function parameter.
hope this answered your question
Best Regards -
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 -
I am customizing PO Requisition Approval workflow and modifying the Approval List Routing Using AME process. I am adding a node which kicks off a plsql process to update some custom tables.
The purpose of this customization is to get who last approved (the previous approver) the requisition and who is the next approver. The workflow item attribute APPROVER_EMPID is helpflul to know who the current approver. But I also need who was the previous approver. Any easier way to get this info or any oracle table ?
I tried FORWARD_FROM_ID which always has the emp id of the person who submitted the requistion, not the last approver. Any suggestions to get this info ?
Thanks
SPIf the requisition is already approved once, then you can take the approver name from the following query by joining with hr_employees/per_people_f
select employee_id from po_action_history where object_type_code = 'REQUISITION' and action_code = 'APPROVE' -
Hi All
I have one sharepoint list with huge data i.e with 20columns and more than 200 records with the fields .
Suppose lets consider there are A,B,C,D,E,F,G,H columns.
Now i want to create one form with the fields A,C,E.
When the user enter the existing data of list for columns A,C..based on C value the E column value should change and update that particular item in the list.
Please guide me without visual web part can we acheive this by Sharepoint designer 2013 or what would be the preferable solution.
Please help me on this as it is very urgent from me..
Thanks in Advance
Sowjanya GHi,
According to your post, my understanding is that you wanted to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.
I recommend to create workflow associated to the list and then start the workflow automatically when an item is changed.
In the workflow, you can add condition and actions as below:
If current item: C equal to Test1
Set E to Test2
Then the value of the filed E will be changed based on the value of the filed C.
In addition, if you create the form using InfoPath, you can add rule to the filed C as below:
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Sharepoint Foundation Can not update External List by Work Flow
Hi
I try to update External List by other list Work Flow, in Sharepoint 2010 Foundation.
Here is the manual:
http://msdn.microsoft.com/en-us/library/office/ff394479(v=office.14).aspx
But it fails , and the error message is “The
workflow could not update the item in the external data source. Make sure the user has permissions to access the external data source and update items.”
Is there some limited in Foundation?http://social.technet.microsoft.com/Forums/en-US/0bb9ef28-3614-4db2-b19f-dd81e8cc2d42/the-workflow-could-not-update-the-item-in-the-external-data-source?forum=sharepointgeneralprevious
With no Secure Store in Sharepoint what we ended up doing was creating a new external content type, adding a new connection and picking a connection type of .net type instead of sql. This means we needed to create a .net app as the go between but within
.net we had all the usual tools for connecting to sql without permission issues.
Also check
http://wyldesharepoint.blogspot.in/2010/06/setting-up-external-content-type-for.html
If this helped you resolve your issue, please mark it Answered -
how to get reading list in my all my devices and computer (window 7). i have installed ios 6 on iphone and icloud control panel on both PC's (home and office) but i dont get updated reading list on all my devices.
Hi bluegrandpanash,
Thanks for visiting Apple Support Communities.
If you backed up your iPhone to iCloud before updating the software, first try the steps under "Restore from an iCloud backup" in this article to recover your data:
iOS: Back up and restore your iOS device with iCloud or iTunes
http://support.apple.com/kb/HT1766
Best Regards,
Jeremy -
Getting error while trying to get pending approval list from SOA server
Hi,
I have followed the steps mentioned in the following post to get the pending approval list from SOA server using java api's :
Using Java APIs for Oracle Human Workflows | Oracle Technologies Premier
But when I am running the java program I am getting the following error :
java.io.InvalidClassException: oracle.bpel.services.common.exception.ServicesException; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = -2263933888849127134
Please let me know how to solve this issue.
ThanksYou would need to spcify the JNDI path in a properties file or the like.
Suggestions here should help -
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial -
How to get all the approver list for a particular transaction in iExpense
Is there any API to get all the approver list for a particular transaction in iExpense workflow after submitting an expense report?
Hi All,
Could anyone please let me know API to get all AME approvers in one go.
I am currently using below API to get approver list.
ame_api.getallapprovers (applicationidin => 201 , -- PO
transactionidin => l_document_id , -- req header id
transactiontypein => 'PURCHASE_REQ'
,approversout => l_appr_list
But if any of the approver is INACTIVE then API is going into exception and not showing all approvers. Requirement is like to show all approvers with their statuses (ACTIVE / INACTIVE).
Reply ASAP. -
I have created a farm solution and then i deploy it to SharePoint server, the code looks as follow, and i use it to update a page info values (as the current page values represents old info):-
[ToolboxItemAttribute(false)]
public partial class VisualWebPart1 : WebPart
// Uncomment the following SecurityPermission attribute only when doing Performance Profiling using
// the Instrumentation method, and then remove the SecurityPermission attribute when the code is ready
// for production. Because the SecurityPermission attribute bypasses the security check for callers of
// your constructor, it's not recommended for production purposes.
// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
public VisualWebPart1()
protected override void OnInit(EventArgs e)
base.OnInit(e);
InitializeControl();
using (SPSite site = new SPSite(SPContext.Current.Site.Url))
using (SPWeb web = site.OpenWeb())
SPList list = web.Lists["Pages"];
web.AllowUnsafeUpdates = true;
foreach (SPListItem items in list.Items)
items["Author"] = "SharePoint";
items["Created"] = "01/08/2014 01:44 PM";
items.Update();
list.Update();
web.AllowUnsafeUpdates = false;
protected void Page_Load(object sender, EventArgs e)
but when i try adding this web part to a page i got the following error:-
Invalid data has been used to update the list item.The field you are trying to update may be read only
so can anyone advice?i only changed lines bitween
web.AllowUnsafeUpdates = true;
and
web.AllowUnsafeUpdates = false;
and other parts of code remains without change
so it will updates all pages in current web
yaşamak bir eylemdir -
Hi.
I am getting below error while adding value to look-up field.
Invalid data has been used to update the list item. The field you are trying to update may be read only.
I have tried many forums ans post but didn't come to know what's the root cause of issue. I am also posting Code for creating and adding lookup field.
CAML to create lookup field (It works Fine)
string lkproductNumber = "<Field Type='Lookup' DisplayName='Product Number' StaticName='ProductNumber' ReadOnly='FALSE' List='" + pNewMaster.Id + "' ShowField='Product_x0020_Number' />";
Code to insert value to lookup field
ClientContext client = new ClientContext(SiteUrl);
client.Load(client.Web);
client.Credentials = new NetworkCredential(this.UserName, this.Password, this.Domain);
// Lookup Lists
List pmList = client.Web.Lists.GetByTitle("Product_Master");
//List Conatining Lookup Columns
List piList = client.Web.Lists.GetByTitle("Product_Inventory");
client.Load(piList);
query.ViewXml = "<View/>";
ListItemCollection collection = pmList.GetItems(query);
client.Load(collection);
client.ExecuteQuery();
int prodid=0;
foreach (ListItem item in collection)
if (Convert.ToString(item["Product_x0020_Number"]) == ProductNumber)
{ prodid = Convert.ToInt32(item["ID"]); }
ListItem piItem = piList.AddItem(new ListItemCreationInformation());
piItem["Product_x0020_Number"] = new FieldLookupValue() { LookupId = prodid };
piItem.Update();
client.ExecuteQuery();
Exception Detail
Microsoft.SharePoint.Client.ServerException was caught
Message=Invalid data has been used to update the list item. The field you are trying to update may be read only.
Source=Microsoft.SharePoint.Client.Runtime
ServerErrorCode=-2147352571
ServerErrorTypeName=Microsoft.SharePoint.SPException
ServerStackTrace=""
StackTrace:
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at WebServiceProviders.ClientServices.NewProductInventory() in Z:\.............ClientServices.cs:line 889
InnerException:
Quick response is highly appreciated.
Thanks
MeharTry some thing like below,
your data value that needs to be update should be in this format "ID of the lookup";#"Title of the Lookup"
For example,
listItem["Product_x0020_Number"]
= "1;#iPhone";
listItem["Product_x0020_Number"]
= "2;#Mobile";
Hope this helped you.... -
Application on approved list won't open
I am running a lab using the Mac OX Server (Leopard) and have had several problems with applications being on the "approved list" but not allowing the user to open them. iPhoto is one of them and the newest is a free program called TextWrangler. Students are logging in to their own hard drive, using the applications that are on the computer. These programs work when logged in to the computer, but not the server. A message always pops up saying the program is not on the approved list to contact the person who set it up. Can anyone help, please?
Kimberly, there are a couple of things you can try.
In Workgroup Manager, in your group preferences, under 'Applications' where you're managing what apps they can use, you can try adding the applications in question as if they were folders.
So by this I mean, where you see the tabs Applications|Folders, select folders and where it says "Allow applications within these folders" click the plus icon and navigate to the application in question as if it were a folder.
An application is basically a folder (there are a bunch of files inside it) but it doesn't behave like one when you double click it (instead it launches).
Once you have saved your preferences it would be a good idea to delete the managed preferences on the client machine before testing again.
These are located /Library/Managed Preferences/
(note that that is the main "Library" folder at the root of the Macintosh HD not a users Library folder.)
You can delete the whole "Managed Preferences" folder.
This folder temporarily stores the settings that are being sent to the client by the server so that they don't have to be downloaded each time a user logs in, and you're deleting it to be sure your new settings are being downloaded.
I have personally found that I 'do' need to sign my applications under some circumstances. Where are you using WorkGroup Manager? Are you using it on the server or are you using it on one of the client machines? If you're using WGM on the server to add applications, have you checked that the versions of the applications on the server are the same as on the client? Have you tried logging in as admin to one of the client machines, and using Workgroup Manger, adding the application directly from the client machine?
Sorry for the overly long post.
Message was edited by: Fridgemagnet -
I am trying to set up a child account where websites are restricted unless they are on the approved list, however youtube is still allowed. How do I block youtube?
Hello jmkibert,
Thank you for using Apple Support Communities.
For more information, take a look at:
OS X Mavericks: Set up parental controls
http://support.apple.com/kb/PH14414
Web > try to limit access to adult websites > customize > never allow these websites.
Have a nice day,
Mario -
Unable to update SharePoint List Programmatically in SharePoint Online - Anonymous Login
We are unable to programmatically update SharePoint lists with Anonymous access in Office 365 - SharePoint Online site. That is, in a public facing SharePoint Online Site, we have a Contact Us Page and when submitted, we would like to store that item in
a List and then also a trigger an e-mail notification? We are unable to do that using SPServices or CSOM because the code is not firing as the user is logged in anonymously. How do we do this?
Karthick SNaveen,
I tried this solution and I am getting correlation error .Can you please check this?
Error is:
"Web Part Error: Solution failed validation. Correlation ID: e225e49c-c008-1000-ae6e-eeb998cf42af." -
How to update SharePoint list columns including choice fields programmatically?
Hi All,
I have a requirement to update multiple columns (which are choice columns) in a SharePoint list. I'm a newbie at creating event receivers and timer jobs. Not sure which one to do and where to start first. There are approximately 4500
list items in the lists. I was thinking I could use one list to maintain the Keywords and perform updates or timer job to any targeted lists.
Scenario. Anytime a power user of the sharepoint list wants to update any of the choice field items or possibly even the column name itself, they want to be able to make updates to any of the list
items or other
lists that contain the new name. The columns I'm using are all choice fields named Assigned To, Division, Region, Job Title, Department, and Zone.
Here's sample code for Updating list:
using (SPSite oSPsite = new SPSite("team url/"))
using (SPWeb oSPWeb = oSPsite.OpenWeb())
oSPWeb.AllowUnsafeUpdates = true;
// get the List
SPList list = oSPWeb.Lists["Keywords"];
//Add a new item in the List
SPListItem itemToAdd = list.Items.Add();
itemToAdd["Title"] = "My Title Field";
itemToAdd["Assigned To"] = "Assigned To";
itemToAdd.Update();
// Get the Item ID
listItemId = itemToAdd.ID;
// Update the List item by ID
SPListItem itemToUpdate = list.GetItemById(listItemId);
itemToUpdate["Assigned To"] = "Assigned To Updated";
itemToUpdate.Update();
// Delete List item
SPListItem itemToDelete = list.GetItemById(listItemId);
itemToDelete.Delete();
oSPWeb.AllowUnsafeUpdates = false;
Any help is greatly appreciated. Please provide code sample and references. Thanks!Thanks Ramakrishna -- Here's what I have so far.
namespace MonitorChanges
class MyTimerJob : SPJobDefinition
public MyTimerJob()
: base()
public MyTimerJob(string sJobName, SPService service, SPServer server, SPJobLockType targetType)
: base(sJobName, service, server, targetType)
public MyTimerJob(string sJobName, SPWebApplication webApplication)
: base(sJobName, webApplication, null, SPJobLockType.ContentDatabase)
this.Title = "My Custom Timer Job";
public override void Execute(Guid contentDbId)
// Get the current site collection's content database
SPWebApplication webApplication = this.Parent as SPWebApplication;
SPContentDatabase contentDb = webApplication.ContentDatabases[contentDbId];
// Get a reference to the "ListTimerJob" list in the RootWeb of the first site collection in the content database
SPList Listjob = contentDb.Sites[0].RootWeb.Lists["ListTimerJob"];
// Add a new list Item
SPListItem newList = Listjob.Items.Add();
newList["Title"] = DateTime.Now.ToString();
newList.Update();
Talibah C
Maybe you are looking for
-
Every time I try to do anything on my safari it randomly opens new windows to what looks like fraud websites. Also it will not let me watch anything on Netflix. Please help!
-
Hi All, Why does my sun netra 210 cannot passed the network packet over HP Procurve 3500yl Core Switch? But, no problem occured when i use Cisco Catalyst Core Switch. Is there any incompability between Sun and Hp Procurve, or i need to install new pa
-
After months of successful syncing with my MacBook Pro, my 3G got the message that it was not an authorized device. The computer then erased all the Apps I had downloaded, along with any song I hadn't purchased from iTMS. I tried the "restore" functi
-
Some sites don't have symbols unless "allow pages to choose their own fonts" is checked
With option "allow pages to choose their own fonts..." deselected, some symbols are improperly displayed. I think I know what's happening. With the option selected, FF displays some symbol characters with the wrong font. But, this doesn't make sense,
-
Python tool for keeping track of strings
I wrote this just now. It associates keys to strings; basically a centralized means of storing values. #!/usr/bin/env python from cPickle import load, dump from sys import argv from os.path import expanduser strings_file = expanduser('~/lib/cfg-strin