Update List Item in Certain View

I am creating a workflow that will update information from an Infopath form back to another list.  My issue is that the list it updates may have several items that match the criteria but only one is valid.  

Here's the scenario. I have a PC Inventory list that has all current and past PCs in it.  I have a view setup that only shows current inventory. I have a column checkbox in the list that is named "Reassigned".  These do not show up in the current inventory view for obvious reasons.  The list itself may have the same computer in there 3 or 4 times, just depending on how many times it has been reassigned.  

Fast forward to my new infopath form that I am creating... This is for new hires.  There is a drop down that displays the list of available computers in the PC Inventory list to assign them to.  I created a workflow to update the PC Inventory list whenever a computer is assigned via the New Hire form.  It puts their name as the person it is assigned to.  Problem is that it will assign it to the first item in the list that matches the serial number and not necessarily the one that is in current inventory.  So since the computer is in the list multiple times it will not "assign" the correct one. 

Is there a way in a workflow to have it filter to a view and only update items in that view?  Or am I going about this all wrong? 


July 10th, 2013 7:58pm

Hi,

Thank you for your question. I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience. Thank you for your understanding and support.

Best Regards.

Free Windows Admin Tool Kit Click here and download it now
July 11th, 2013 11:07am

Hi maj170123,

first of all, i would like to ask, based on the sentence: "the first item in the list that matches the serial number and not necessarily the one that is in current inventory"

i think serial numbers should be unique for each one of the items, so do in your environment have more than 1 items that have the same serial number?

the system may confused because i assume the search is based on the serial number.

if the main issue lies because of the first workflow that makes your list become redundant, perhaps you may have a check your workflow steps, and if there are search process for the same serial number first, then check if should it will be edit or add. 

if for example, the code is edit, then to make safe, you may grab all the information for that item, delete then re-add with the new properties, in hope that only have 1 item there.

for your request, to update to the same view, i found this quite hard to realize, because workflow read the data from the data sources when it run, not based on views. those items should be put in the same data source.

July 11th, 2013 12:03pm

Aries,

Every time a computer comes into inventory it is added to our list.  When it is reassigned, the reassigned column gets checked and it drops off the "current inventory" list.  

If that computer comes back to us, we add it to the list again.  This way we can track the past computer users as well. 

So yes, the same computer may be in that list multiple times.  This list has been around for awhile so the current function I need wasn't thought of when the list was originally created. 

Free Windows Admin Tool Kit Click here and download it now
July 11th, 2013 3:43pm

Hi maj170123,

Since sharepoint not able to search by view, but only from the datasource,

is there any other column that distinct the search attribute that is very specific so that you able to find the one that you want?

on sharepoint we have this procedure: http://msdn.microsoft.com/en-us/library/ms955041.aspx

but while it is distinct, perhaps it also result the serial number that you not need. so perhaps you need to add 1 more column so it able to result the one that you need.

July 12th, 2013 6:21am

Is there a way to update based on another column?  Say only update if it matches "serial number" and also "reassigned" is not equal to yes? Would this only update the first "serial number" match as or would it check each match in the list? 
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2013 3:29pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics