Working with workflows and populating lists - sharepoint

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.

Related

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

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

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!

Autofill sharepoint list form based on currently filtered field

I have 2 lists that are connected. When I filter List A by ProjectID, I get results in List B only for that projectID.
What I am trying to do is, let's say the List A filter is on Project ID: 1.
When I go to add a new item to List B, the field 'Project ID' will automatically be filled with ID 1.
Any ideas on ways to go about doing this?
Is ProjectId a lookUp column in ListB?
If not and you are using the default edit form of SharePoint then it is not straight forward. I think the easiest approach would be InfoPath form if you are allowed to publish them in your SharePoint environment.

Nintex Workflow: Querying Another List

I'm currently working on a nintex list workflow for List A. I want a certain step in this workflow to run when an associated folder for the item in library B is modified.
For example:
User adds document to Item 1 in Library B
This then fires Nintex step to change status of Item 1 in List A
Any suggestions?
You could make a new workflow on Library B which updates a status column in List A when the document is added. In list A workflow you can use "wait for item update" shape to run you steps once the status was changed.
Create a list level workflow in library B, change the trigger settings from manual to Create or change item. Then configure it so that it queries for the item in List A using the common field(lookup field), Update the item.

SharePoint 2010 Foundation Update List Where clause

I need to update List A from a form submitted in List B, where B.username = A.username. I am used to using SharePoint 2010 Enterprise and some of the advanced tools that go with that, but right now I am stuck on 2010 Foundation.
I don't know if I'm just having a brain pfft or something, but I can't make it work. Is this a limitation of Foundation? In the workflow editor in 2010 Designer, I can say update List A with a value from List B, but somehow not submit a where clause. Can anyone help?
What I'm actually trying to do is have a list of all users on the network and the form from List B just updates the "Accept" or "Decline" by the user's name in the first list.
Any help would be appreciated.
Assuming this is one-to-one relationship - that is, the WF triggered on the item in List B would only ever update one item in List A - when you configure your "Update List Item" action within the WF and select a "List" other than 'Current Item', a section will appear at the bottom called "Find the List Item" that will allow you to define how the WF will find the item in List A to update.
See here:
Bear in mind though, when using SharePoint Designer, you're limited to one-to-one relationships, and the only 'where' clause you can apply is an equals filter whereby some value you have (be it from the current item, a WF variable, an initiation parameter or a static value) is compared via equals operator to a field in the remote List (i.e. your List A). Should you define a clause that could result in more than one match - again, your WF on List B cannot trigger an update to 'n' items in List A - you will see this warning:
Caveat: all these conditions only apply when creating a WF via SPD; if you have access to Visual Studio, you can use it to create & deploy workflows that do support updating multiple items in a remote list based on a single WF being triggered, querying the associated items through something other than an equals, etc.

Resources