Updating a title column in list that is a lookup column to document library in sharepoint designer workflow 2010
Hi I have a requirement to create a list item in Contracts List when a document is uploaded in Contracts Vendor library.
Contracts List will
have columns - Contract Name ( title column), Contract Number, Contract Start date and end date.
Contracts Vendor library will have Contract
Name,Contract NUmber.
User will select the Contract Name from drop down ( this is look up column linked to Contract Name in Contract
List).When user uploads document in Contract Vendor library then item should be created in Contract List with selected Contract Name and
Contract number .
Contracts and Contracts Vendor are related by look up Contract Name. Contract Name is internally a title column in
Contracts List.
Issue1 :
Since Contract number is look up column, while I am creating item the Contract name is not getting updated in
Contracts List. I have to use sharepoint designer workflow to achieve this task. Title colum or Contract Name shows no title.
Issue 2:
One
more issue I am facing is that Contracts List has Section and Division cascaded drop downs when i select values from section and division
dropdowns and save item in Contracts list the values are getting saved in Contract List.
Could anyone suggest me how to handle this ? I am
attaching the screenshots of the list and library structure. TRuly appreciate your help.
Below are screenshots of the list structure
Hi,
According to your post, my understanding is that you wanted to update a title column in list that is a lookup column to document library in sharepoint designer workflow 2010.
I try to reproduce the issues as follows:
Create a custom list named Contracts List, add columns: Contract Name ( title column), Contract Number(Number), Contract Start date(Data and Time) and Contract End date (Data and Time).
Create a document library named Contracts Vendor library, add columns: Contract Name(Lookup), Contract NUmber(Lookup).
Create a workflow associated to the Contracts Vendor library.
Add action: Create List Item.
5. Start the workflow automatically when an item is created.
6. Upload a document, select the Contract Name and Contract NUmber, the workflow will be started automatically.
7. Open the Contracts List, an item will be added with the Contract Name and Contract Number in the Contracts Vendor library.
Thank you for your understanding.
Best Regards,
Linda Li
Linda Li
TechNet Community Support
Similar Messages
-
Modify list view - Group by Lookup column's ID
Hi
I have a main list that has a lookup column. The grouping works fine, but I want the sort order of the group to appear as the way the lookup value's ID is ...
What are the ways to achieve this, I do not want to put a number in front of the values, is there another way to do thisI understand that you don't want to add additional info in front of the lookup column values to keep the value exactly as expected.
as SharePoint 2010 allows to lookup additional fields, I would suggest to lookup the item ID also with the lookup column.
1. create a lookup column lookup your expected list.
2. in the lookup column settings, "Add a column to show each of these additional fields", check "ID" column.
3. group by the list view with the additional ID instead.
There is an issue by doing this step, the groupby title value is the lookup ID column not the original lookup column, as we actually doesn't use the lookup columnn with grouping.
For this, you can use SharePoint Designer to edit the list view, change the groupby row cell to the lookup column value instead.
Qiao Wei <br/> My blog:http://blog.goobol.com -
Sharepoint Designer Workflow - Send an Email that displays Item Changes
Hi,
I have set up a Sharepoint Designer Workflow that sends an email to the Owner of an item (designated by a column in my list) whenver that item is changed by another user. The workflow looks like this:
If Current Item:Modified by not equals Current Item:Primary Owner
Email Primary Owner
This is set to occur whenever an item is modified.
I would like the email to show what changes were made to the item, similar to how Sharepoint's notifications work. It should show what the field that was changed to trigger the notification contains currently and what it contained previous to the change.
Any help is much appreciated.hi,
out of box there is no option available. But you can implement a solution.
Create a hidden field as multiple line of text. Make it a hidden field so that user cannot enter into this field.
When ever a workflow start check if this field is empty that means item is create now using string manipulation in workflow concatenate the meta data in one workflow variable and save it in this hidden field.
whenevre a workflow is start if hidden field is not empty it means this is an update item scenerio and than you
can have read old values from this field and you have new values in item metadat. format email to get diff.
send email upadte the hidden field again with new meta data.
Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer -
How to find item is updating in Sharepoint designer workflow?
Is there anyway we can get when list item updating in sharepoint designer workflow?. I have status ="New" it is need to send only one time when new item created.
But now it is sending emails when item is updating with status="New". So I want check if it is new then only check status="New" and send email. otherwise No.
ItsMeSri SP 2013 FoundationHi ,
According to your description, my understanding is that you want to send email in workflow only when the item is created and the status is New.
For this issue, I suggest you create a new Yes/No column called “Edited”, and set the default value to No. When you edit it after creation, change the column to Yes.
You can set the workflow like the screenshot:
Best Regards,
Wendy
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]
Wendy Li
TechNet Community Support -
Hello,
I'm attempting to use use the Target Audiences field in a SPD 2013 workflow, in this case just attempting to log the value to history for testing purposes. This is failing saying the column does not exist.
I enabled Audience Targeting on the list then create a simple workflow to log the value to history when the item changes.
I change an item and the workflow starts, but when it gets to any action looking at "Current Item:Target Audiences" it stops and says:
HTTP BadRequest to <site url>/_api/web/lists(guid'XXXXXXXX')/Items(4)?%24select=ID%2CTarget_x0020_Audiences
The field or property 'Target_x0020_Audiences' does not exist.
But it does. It is listed in the list setting and enabled for the content type.
I ran the listed API through an API program and sure enough, Target Audience is not listed in the results object.
I'm 99% sure I've enabled this and that the field is present and the workflow is valid. I ran the same situation on two lists to ensure it wasn't a hiccup, same results.
Is this a know issue? I couldn't find anything obvious online saying you cannot see this field via workflow, most of what i found said this would work.
Thanks an advance for any input.Thanks so much Lisa, for the clarification.
I understand what you have explained, and have seen several similar explanations that have lead to my confusion. Can you elaborate a bit, maybe for the sake of future information seekers?
I understand that audiences can be defined using the rules operations in Central Admin, but it seems another standard function is to just directly assign existing SharePoint groups. I think this is what you mean above, but this is also the point of
my misunderstanding.
In this particular setup I have only used existing SharePoint groups with no audiences defined in Central Admin. List Item A has a target audience of SharePoint group X, just that simple of a setup.
Assuming the above is valid, I would then like to see or alter the groups via SPD workflow.
Based on the following posts, I was under the impression this may be possible (but obviously not fully clear and thus I posted this):
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/5eb984ba-55a3-4da7-a904-c34b2fece84c/how-do-i-set-the-target-audience-using-sharepoint-designer-workflow
http://www.sharepoint-tips.com/2011/01/setting-target-audiences-with-code.html
(sorry about lack of links, my account must still require verification)
So in SPD, I set a simple action such as "Log Current Item:Target Audience to history" (note the I am able to select target audience in SPD like any other field with no errors). At this point I am assuming everything is valid as SPD is treating
the field like any other string field. When executed the error in the above post comes up.
So to confirm your explanation, this is not supported? Even though the field is available for selection by design, it is not capable of use and known to produce errors in all cases of its use? The first post above is 100% wrong and you cannot
use SPD to set/view the target audience field? The second post is also wrong as it seems to present the fields as available for alteration using string concatenation?
If in fact the field is present by design, but also impossible to use by design, is this potentially a bug as the field is not supposed to be available if it will always produce the error when used with no error in SPD during compile?
Thank you again for the reply and I hope we might be able to provide a rock solid answer to this for future seekers. -
SharePoint Designer Workflow to email multiple recipients listed in a custom list
Hi all,
I created a workflow in designer attached to a form library. I also have a custom list "Admins" containing names of persons that serves a different purpose but would also like to be used as recipients for the workflow email everytime a new item in the
form library is created.
I have been searching the net and tried out few work arounds but so far able to send to only one person in the "Admins" list. The list has a column "Admin Name" which is of type "Person or Group".
Thanks in advance!You will not be able to do this specific task with SharePoint Designer workflows. Like you stated, it can only target a specific value, based on the value in anoter column. The easiest work-around would be to create a SharePoint security group
that contains the users, then target that group in the Send Email action. Just make sure that the group is configured for membership to be visible by all users. I know it is not ideal to manage information twice, but this is a limitation of SharePoint
Designer.Chris Caravajal MCTS SharePoint911 Consulting & Support Services -
Copy ID from one library to list using sharepoint designer workflow 2013
Hello,
I am new In SharePoint Designer workflow.
I want to copy ID [by default] from one SharePoint Library to SharePoint List by using SharePoint Designer workflow 2013.
So Please provide me any solution on it.
Thanks,
Samadhan.Hi Bjorn,
Please create a workflow based on SharePoint 2010 platform, there is OOB action "Copy List Item" which can copy attachment to another list.
Then use "Update List Item" action to update fields value for the new item. In this action, we could use Item title to locate the newly created item. For your reference:
However, we cannot make this workflow to start automatically. As workaround, we could use SharePoint Designer to create a Custom Action in the Source List and initiate the workflow. In my test, I created a Custom Action in the type of List Item Menu. Then
the custom action would appear in the Item ellipsis dropdown menu:
Regards,
Rebecca Tu
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] -
SharePoint Designer workflow - update list item field without creating new version?
Hello,
I have a list that uses versioning.
I have a workflow, designed in SharePoint Designer, that will track changes in some columns, and if there is a change it will send out an email.
To track the changes eg in the Status column, I have a hidden "OldStatus" column so I can compare the current value with the previous value.
If it's different it means it has been changed, and I send out an email, then update the OldStatus with the current value so they're in sync again.
Problem I have now is that when I update the OldStatus column in my workflow it will create a new version of the listitem. I don't want that. This is a system value change and has no value at all to the end user.
In C# I can do a systemupdate to avoid this, but how can I do this in SharePoint Designer?
Please don't tell me I should write the entire workflow in code, only to get access to the systemupdate command....I created a Worfklow Activity class, called "UpdateFieldInCurrentItemSilentMode".
I add the default context properties to work with:
#region Context properties
public static DependencyProperty __ContextProperty = DependencyProperty.Register("__Context", typeof(WorkflowContext), typeof(UpdateFieldInCurrentItemSilentMode));
[Category("My Workflow Actions")]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public WorkflowContext __Context
get
return ((WorkflowContext)(base.GetValue(UpdateFieldInCurrentItemSilentMode.__ContextProperty)));
set
base.SetValue(UpdateFieldInCurrentItemSilentMode.__ContextProperty, value);
public static DependencyProperty __ListIdProperty = DependencyProperty.Register("__ListId", typeof(string), typeof(UpdateFieldInCurrentItemSilentMode));
[ValidationOption(ValidationOption.Required)]
public string __ListId
get
return ((string)(base.GetValue(UpdateFieldInCurrentItemSilentMode.__ListIdProperty)));
set
base.SetValue(UpdateFieldInCurrentItemSilentMode.__ListIdProperty, value);
public static DependencyProperty __ListItemProperty = DependencyProperty.Register("__ListItem", typeof(int), typeof(UpdateFieldInCurrentItemSilentMode));
[ValidationOption(ValidationOption.Required)]
public int __ListItem
get
return ((int)(base.GetValue(UpdateFieldInCurrentItemSilentMode.__ListItemProperty)));
set
base.SetValue(UpdateFieldInCurrentItemSilentMode.__ListItemProperty, value);
public static DependencyProperty __ActivationPropertiesProperty = DependencyProperty.Register("__ActivationProperties", typeof(SPWorkflowActivationProperties), typeof(UpdateFieldInCurrentItemSilentMode));
[ValidationOption(ValidationOption.Required)]
public SPWorkflowActivationProperties __ActivationProperties
get
return (SPWorkflowActivationProperties)base.GetValue(UpdateFieldInCurrentItemSilentMode.__ActivationPropertiesProperty);
set
base.SetValue(UpdateFieldInCurrentItemSilentMode.__ActivationPropertiesProperty, value);
#endregion
Then I add my own input parameters to work with:
public static DependencyProperty StaticFieldNameProperty = DependencyProperty.Register("StaticFieldName", typeof(string), typeof(UpdateFieldInCurrentItemSilentMode));
[Category("My Workflow Actions"), Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public string StaticFieldName
get
return Convert.ToString(base.GetValue(StaticFieldNameProperty));
set
base.SetValue(StaticFieldNameProperty, value);
public static DependencyProperty FieldValueProperty = DependencyProperty.Register("FieldValue", typeof(string), typeof(UpdateFieldInCurrentItemSilentMode));
[Category("My Workflow Actions"), Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public string FieldValue
get
return Convert.ToString(base.GetValue(FieldValueProperty));
set
base.SetValue(FieldValueProperty, value);
Then the actual workflow action code:
protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
try
if (this.__Context == null)
throw new Exception("__Context is NULL");
if (this.__Context.Site == null)
throw new Exception("__Context.Site is NULL");
//reload the web using the SPSite object to work around any limitations on the objects
//applied to the user running the workflow
SPWeb tmpweb = __Context.Web;
SPSecurity.RunWithElevatedPrivileges(delegate()
using (SPSite site = new SPSite(tmpweb.Url))
using (SPWeb web = site.OpenWeb())
//load list
SPList lst = web.Lists[new Guid(__ListId)];
//load listitem
SPListItem item = lst.GetItemById(__ListItem);
//update field value
item[this.StaticFieldName] = this.FieldValue;
//commit changes
item.SystemUpdate();
//return success workflow status
return ActivityExecutionStatus.Closed;
catch (Exception exc)
string sMsg = "Error in 'UpdateFieldInCurrentItemSilentMode':" + Environment.NewLine
+ exc.Message + Environment.NewLine + Environment.NewLine +
"StaticFieldName: " + this.StaticFieldName + Environment.NewLine +
"FieldValue: " + this.FieldValue;
Common.WriteErrorToLog(sMsg);
//return failed workflow status
return ActivityExecutionStatus.Faulting;
Note: the WriteErrorToLog function is a custom function that writes the error to the event log. It's located in another class. You can replace it with your own error handling approach.
Then we need to specify the workflow action in the .actions file, so SharePoint Designer knows about it and which parameters are required:
<Action Name="Set field in current item (silent mode)"
ClassName="My.WorkflowActions.UpdateFieldInCurrentItemSilentMode"
Assembly="My.WorkflowActions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0f8d2d9e2dfb2160"
AppliesTo="all"
Category="My Workflow Actions">
<RuleDesigner Sentence="Set field %1 in current item to value %2 (silent mode)">
<FieldBind Field="StaticFieldName" DesignerType="ParameterNames" Id="1" Text="StaticFieldName" />
<FieldBind Field="FieldValue" DesignerType="ParameterNames" Id="2" Text="FieldValue" />
</RuleDesigner>
<Parameters>
<Parameter Name="StaticFieldName" Type="System.String, mscorlib" DesignerType="ParameterNames" Direction="In" />
<Parameter Name="FieldValue" Type="System.String, mscorlib" DesignerType="ParameterNames" Direction="In" />
<Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext" Direction="In" />
<Parameter Name="__ListId" Type="System.String, mscorlib" Direction="In" />
<Parameter Name="__ListItem" Type="System.Int32, mscorlib" Direction="In" />
<Parameter Name="__ActivationProperties" Type="Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties, Microsoft.SharePoint" Direction="Out" />
</Parameters>
</Action>
That is all you need for the specific code, the rest is common code to build custom workflow actions, which you can find on many blogposts or this forum. -
Move sharepoint 2010 list to 2013 with lookup columns
Hi all,
Iam planning to move my sharepoint 2010 list to 2013.I done this using save site as template.But the look up columns are showing empty data.Can u please let me know the best solution to do this.
Regards,
PraveenThe reason the lookup column doesn’t work anymore in your SharePoint 2013 list is because Save
Site as Template, preserve all the list settings. Therefore, the lookup column still points to the original list which
was located on your SharePoint 2010 list. The lookup column stores GUID of the web, list, and the field to which it points
and GUID are unique IDs that identifies a list/library/site/feature in a farm.
Using SharePoint Manager you can find the LookupList, LookupWebId and LookupField of
your old SharePoint 2010 lookup column and compare it with your new 2013 lookup column. You will see the difference.
There are two approach to get your values in lookup again.
1(a). Create a new list and update the lookup values.
1(b). Delete the lookup column and create a new lookup column and point it to the new list created in the above point.
2. Update the SchemaXml property
of the lookup column through SharePoint Manager.
I will provide you with a good reference on how to use SharePoint Manager while managing your lookup columns. http://blog.johnsworkshop.net/moving-lists-with-lookup-columns-inside-your-site-collection/
Please remember to click 'Mark as Answer' and Vote as Helpful if the reply answers your query. -
How to update a list item through Sharepoint Designer Workflow?
Hi,
I have a created a list, in which "Completion date" column is there.
Now I want to update column "Completion Date" through SPD, specifies value(date) after 10 days of created date of a record in list.
Please help.
Thanks in advanceHi,
You can use the "Build Dynamic String" action to convert the date field to a string,
And use string comparison to determine if the date is blank
For more information, please refer to
http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!498.entry
Hope this helps
Thanks!
Stanfford -
Is it possible to give link of document library in sharepoint list in 2010
Hi All,
Using share point list data we have shown in reports. For this we create 1 view and shown as reports. we have 1 document library with title field, same field is in list also.when we click on link on list - it redirects to library folder.
Is their anyway to do that where as list is custom list.
Any help is appreciated..!Hi Bangara,
According to your description, my understanding is that you want to create a link in your list, then this link is linked to a library folder. Is it right?
You can create a Hyperlink field in your list as opening your list->clicking on ‘Create Column’ under List ribbon, then type a name for the column, select the type of the column is Hyperlink or Picture, and Format URL is :Hyperlink.
After that, when you create a new item or edit an item in the list, you can type the URL of the related library folder in this link field.
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
SharePoint Designer Workflow to check if value exists in any item in SharePoint List
Hi,
I've two column in SharePoint List. I want to check using SharePoint Designer 2013, if value exists in any item in SharePoint List for these two columns "PR NO" and "Part No". Thanks
Can you please help me in SharePoint Designer how to write condition / steps for this. Thanks.Why are you making things complicated for yourself by building a workflow via SharePoint designer 2013.
I had a to do a similar task in the past and running powershells was an easier and faster approach.
Take a look at this Microsoft technetarticle I wrote a while back.
http://social.technet.microsoft.com/wiki/contents/articles/25125.sharepoint-2013-powershell-to-copy-or-update-list-items-across-sharepoint-sites-and-farms.aspx
Even though the above article talks about updating an existing list, you can focus on the condition where the powershell will loop through the list to see if any change has been made. You can add a condition to this change.
Daniel Christian (MCTS) -
How to Copy list item attachment to document library in SharePoint 2010
Hi,
How to Create a folder ("List Item - Title Name") in Document library and copy list items Attachments to the same folder in SharePoint 2010,thanks in advance.
Regards,
Selvan.J
Selvan JHi,
You should first check whether the folder exists in the library, if the folder not exists, then create it.
I had modified the code, you can use the following code snippet to achieve it.
private void EventCopyFileWhenItemCreatedOrUpdated(SPItemEventProperties properties)
SPSite site = new SPSite(http://YourSiteName);
SPWeb web = site.OpenWeb();
SPList doclibList=properties.Web.Lists["YourLibName"];
bool foundFolder = false;
if (doclibList.Folders.Count>0)
foreach (SPListItem fitem in doclibList.Folders)
if (fitem.Title.Equals("FolderA"))
foundFolder = true;
break;
if (foundFolder == false)
SPListItem folder = doclibList.Folders.Add(doclibList.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder,"FolderA");
folder.Update();
string fUrl = doclibList.RootFolder.ServerRelativeUrl+"/FolderA";
SPFolder myLibrary = web.GetFolder(fUrl);
if (properties.ListTitle == "YourListName")
SPListItem sourceItem = properties.ListItem;
properties.Web.AllowUnsafeUpdates = true;
//get the folder with the attachments for the source item
SPFolder sourceItemAttachmentsFolder =
sourceItem.Web.Folders["Lists"].SubFolders[sourceItem.ParentList.Title].SubFolders["Attachments"].SubFolders[sourceItem.ID.ToString()];
//Loop over the attachments, and add them to the target item
foreach (SPFile file in sourceItemAttachmentsFolder.Files)
if (CheckFileNameExist(file.Name , properties) == false)
byte[] binFile = file.OpenBinary();
myLibrary.Files.Add(System.IO.Path.GetFileName(file.Url) , binFile);
private bool CheckFileNameExist(string fileNameInFileAttach, SPItemEventProperties properties)
bool flag = false;
SPList myDocumentLib = properties.Web.Lists["YourLibName"];
SPQuery spQuery = new SPQuery();
SPListItemCollection items = myDocumentLib.GetItems(spQuery);
foreach (SPListItem item in items)
if (fileNameInFileAttach == item["Name"].ToString())
flag = true;
break;
return flag;
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
SharePoint 2010 - Lookup Columns in a SharePoint Designer Workflow (form initiation)
SharePoint 2010
I have a list L1 that start a workflow WF
Intiation form of WF :
I want change column Person/group TO column with checkbox lookup from another list
L2 which contains some users
Solution needed ? How to do that with Sharepoint Designer Or/And Infopath
One way is as you mentioned try the below link
http://xblogs.kompas-xnet.si/post/SharePoint-Designer-2013-Crashing-when-using-select-peoplegroups-from-SharePoint-site.aspx
Instead of setting people picker's Return field as "As String" could you please try setting the return field as Email Address
Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development -
Append Lookup Column Values using SharePoint Designer Workflow
Hi all,
I can set the value of a lookup column using number;#itemname (ex. 1;#MyValue), but I need to add a value to a lookup column that has existing values. I have tried setting the lookup column to the current value plus the new value, but it fails. Please assist.
Regards,
Kelly
Personal Blog: http://thebitsthatbyte.comThis would fail because when using a lookup, that value must exist. The lookup creates a reference and if it can't find the reference in the list it's looking up to, it will fail. If you want to set it to something that is not in that list, then you'd
either need to add it to the list first (run a loop through the list and check to see if it's there, Yes=set the field, No=create new item in list and then set field) or use a single line of text field.
Andy Wessendorf SharePoint Developer II | Rackspace [email protected]
Maybe you are looking for
-
High CPU usage after 10g to 11g Migration
Hello, I have migrated some database instances via import/export from 10g 10.0.3.0 to 11g 11.2.0.2 I found that below SQL Statements mainly cause the high CPU load select * from (select null table_qualifier, o1.owner table_owner, o1.object_name table
-
My iphone 4s will not back up with iCloud. it tells me i dont have enough iCloud storage available, that i can manage my storage in my settings, when i click the settings it tells me i have 2.8 GB free space out of 5 GB. i dont know what to do about
-
Hi, I had requirement,I need to populate the Long text in CO01. Iam using the FM SAVE_TEXT. But it doesnt worked.Iam using the Following code to save long text DATA: BEGIN OF tlinetab OCCURS 100. INCLUDE STRUCTURE tline. DATA: END OF
-
Lightroom 1.1 shows why a...
Database setup like Lightroom uses is such a bad idea. Alls it takes is an update that for whatever reason (Adobe's fault, user's fault, Gods fault) trashes the database and you now know why so many people wanted just a file viewer. While I myself do
-
Reducing shared pool latch contention
I see a lot of shared pool latch contention on my 11gR2 database because there are over 100 identical schemas that run identical SQL. This causes lots of child cursors to be created. Scheduled jobs kick off hourly for every schema at the same time an