SharePoint Designer Workflow to conditionally make a copy of a list item - sharepoint

Good Afternoon,
I am working on an existing SharePoint List with a web enabled infopath form with multiple views, containing questions that are asked at differnt stages of a workflow.
On the very first stage when the list item is created, there is a question with multiple choice (check one). For example, Field Name = Fruits, with values, such as: Apples, Oranges, Cherries.
Later on in the worflow, the user is sent a reminder email, similar to a survey, where questions may look like "What did you think of them apples?
New request from the customer:
In the customers world, every apple eater also eats oranges, and they want also know what the user thinks of oragnes.
So, it sounds like I need to create a conditional worklow that creates a copy of the list item when it is first created, to include all of the initial field values, when Apples is selected, but change the fruit value to oranges in the duplicate.
Note: The survey reminder is set to create an email reminder when a new item is create in the list.
Using a SharePoint Designer 2013 Workflow, how can I do this?
I noticed that SP Designer will not let me use the "Create item in list (Output to Varialbe:Create)" if the list is the same list. I assume this is by design to not create some sort of infinate loop. I guess MS does not trust that I have a carefully planted condition to only run once, which is what I need your help with.
It feels like a crazy idea, but I am considering making a copy of my list, and using Create item in list (Output to Varialbe:Create) to make a copy of the list item in list 2, to set all value the same, with the exception of fruits, where I would change the value to oranges, and then somehow create a workflow in list #2, to copy the list item back to list #1.
Thoughts?
Thanks!

Related

Assign SharePoint list item to a list of individuals on a rotating basis

I am trying to assign list items to a list of individuals on a rotating basis.
Here is essentially what I am trying to do:
Names: Tom Joe Sam
In a SharePoint list, when a user (other than these three people) adds an item to the list, an email/task would be sent to Tom, and Tom only, column will populate with Tom's name as assigned to that item. The same thing would happen if a new list item is added, but it would be assigned to Joe, and then Sam, and then back to Tom, and so on.
Is there any way to do this in SharePoint designer 2013?
Alerting is a standard feature for SharePoint Task lists, however activation has been removed form the UI in SharePoint 2013.
This article describes how you can enable it using PowerShell:
https://gallery.technet.microsoft.com/office/Enable-email-notifications-390a927c
When the alert feature is enabled, the assigned user will be informed about every change to the task item.
For your use case, Tom needs to set up a notification for himself on the list, so he receives an email for every new item even when it is not assigned to him.

Adding data from one list to another with correct ID of list item SharePoint

We are trying to get around the limitation of Field Permissions in SharePoint by creating a second list which will allow users to edit what they are allowed, instead of the whole form. In this case, it is on field that is set to Person or Group (Dashboard). For reference, the Person or Group gets info from AD, I am not sure if that is standard or not info but thought to add it in.
We have created a second list that has two fields, one being a Person or Group (AddToDashC) and the second being plain text (CopyName), where a workflow triggers and sends the Person or Group to plain text as Display Name, as that is what shows in the Person or Group. Last Name, First Name. This workflow works fine.
On the main list, we have separate list items where the Dashboard field can be edited, being unique for each list item. I can’t figure out the logic to be able to match the IDs up so that we can transfer the CopyName information to populate the correct list item ID through a workflow. We have a Lookup on the first list (AddtoDashWFC) which grabs the plain text form, CopyName, but just trying to figure out how to populate it properly.
I was hoping to have an edit link next to each list item in the column, which will go to the second list but still link to the report through the ID.
Sorry for the seemingly basic question, I just can't get the logic.
List 2 Workflow so far
List 1 Workflow so far
Thanks,
Patrick

How to create a sharepoint list column that links to another list that is editable

I'm not sure if the title is a proper descriptor of what I'm trying to achieve here, hopefully it's close enough. I'm not a SharePoint expert, but I'm comfortable with creating forms and workflows as necessary to get something like this to work.
Basically, I need to have two separate SharePoint lists that are linked together, but one list needs to have row level security to hide data from other users that shouldn't see it. I need the column that is being linked to be an editable text box though, rather than a simple lookup field.
For example:
List A
Customer (text)
Description (text)
Sales People (person, multiple selections allowed)
Expenses (linked field)
List B
Customer (text)
Expenses (number)
Created by (just a reference that the sales people would actually "create" each row here)
Essentially, multiple people can be assigned to a customer in list a. The "sales people" are assigned by another user who actually creates the item for list a. I need to be able to have the people who are assigned as "sales people" to have a text box where they can enter their expenses, but on an individual basis, that would then be stored in list b with row level permissions to prevent them from seeing each others expenses totals.
List B would be able to show each sales person their full list of expenses across all the customers they are connected to, but not be able to see each others expenses. It's not a problem if the person creating the item for List A ends up with items in List B that are 0, but I need to be able to have the Expense field be an editable text box from a form that allows the sales people to enter their total expenses for that customer.
If I was building a custom application, this wouldn't be difficult to do, but I can't for the life of me figure out how to do this in SharePoint, or if it is even possible.
This is possible, but it will require custom development, using the SharePoint Object Model. Create your two lists and then you can either create a javascript/HTML based solution using libaries like jQuery and SPServices, or you can create a custom web part and use C# to update the lists. There's lot of examples out on the internet on how to do this. Write some code, and bring any problems you have with the code back to StackOverflow.

Working with workflows and populating lists

Hey all,
I am currently building a workflow, i created a list (let say list A), when the user fills out the list (form) and clicks OK button the workflow kick starts. the first action of workflow should be populating all the fields(whatever filled by user) in the List A to List B (here list B has same columns as list A but some additional columns). How to built this action in workflow. Any thoughts are highly appreciated. Quite a newbie to Sharepoint, eager to learn more about it.
Suppose List A has name field, its being filled as XYZ, then workflow should be able to populate XYZ in same corresponding name field in List B. I hope I made it clear
The question is whether you want to use Sharepoint Designer or a Visual Studio Workflow.
In Visual Studio you have the full Sharepoint object model galore to your hands - the sky is the limit.
In Sharepoint Designer you only have a limited set of Actions which enable you to do stuff. Let me explain a SPD solution.
You basically want this:
List A
Field: Name
Field: Testing
Field: Age
List B
Field: Name
Field: Country
Field: Age
So basically you could transfer Name and Age from A --> B upon creating a new item in list A.
In Sharepoint Designer you can just create a list workflow for list A, which automatically starts upon a new item in the list. When the workflow starts it just needs to get all the data you just entered in the form. So you can use the action Set Workflow Variable and set different variables (of the same name) to Name, Testing, and Age from the item.
You now would have the item's data as workflow variables.
The action Create List Item is next, here you can select a list, an item should be created in and set fields for that list item to your variables. So you could set workflow variable Name to the item's Name in List B, similarly the Age.

SharePoint Approval Workflow

I have a custom content type in SharePoint which has an approval workflow associated with it. The content type contains several Choice Site Columns. There is now a requirement to change the values of the choice columns AND update the existing content to reflect the new values.
Eg,
Existing Choices:
Choice 1
Choice 2
Choice 3
New Choices
Choice 1a
Choice 2a
Choice 3
So, some of the choices are being renamed.
As far as i can tell, whilst changing the choice column is straight forward, the existing list items won't automatically pick up the new values i.e. a list item with Choice 1 selected will still show Choice 1 until the list item is physically edited. But editing the item will require re-approval of the workflow. There are a few thousand items spread over several lists which will be affected by this change.
So, my question: Is it possible to suspend or detach the workflow whilst the changes are made and then re-attach / re-activate after the changes have been made, thus avoiding the need to re-approve everything? Or am i best to look at automating the re-approval?
Any help much appreciated
You could update the values using the object model, the SPListItem.SystemUpdate method that optionally allows you to prevent that a new version is created.
You could use SPSiteDataQuery to find all items using your content type and then update them using the method mentioned above.
Regards,
Daniel Karlsson

Resources