Domanda

I have a list called "Requests". This list has a text field called REQ-ID that is an "ID" field that corresponds exactly with the built in ID field (a workflow on item created populates the REQ-ID field with "REQ-[%CurrentItem:ID%]").

Through whatever business process, these requests get approved.

Now the users want a way to create a new "request" that is really an update to a previously approved request, and the approvers want to know the REQ-ID of the previously approved request.

Easy - add a lookup field (named Previously Approved Request) that refers back to the same "Requests" list it's on, and have it show the REQ-ID field.

Done. Shows up on forms, when users are creating new requests, if it's an update of an old one they can choose the REQ-ID of the old one to link it back. No issues there.

However, now I want to add a little message to the email that goes out alerting the approvers that this new request they are getting notified about happens to be an update to a previously approved request, and include the REQ-ID from the looked up item in the Previously Approved Request field. But I can't because the Previously Approved Request field does not show up when I try to do a workflow lookup to [%CurrentItem:<FieldName>%]. The Previously Approved Request field does not show up in the list of available fields to get from the current item.

This is from a list workflow (item created) on the "Request" list, the same list that the column is on and that the column is a lookup to.

I have gone into the list itself through the SPD interface, and can confirm that SPD sees the column on the list (with it's correct settings), and sees the column in the default Item list content type (in the correct position, etc.). I even tried clearing my SPD cache to force it to reload everything about the site. Same thing, still sees it on the list, but it just isn't there when I want to access it from a workflow.

Why? Where did it go?

È stato utile?

Soluzione

It's by design, You CAN'T use a lookup column that read from the same list in SharePoint Designer Workflow!

In your case, I would suggest doing the following:

  • Creating a new list for Previously Approved Request List.
  • In the Requests list, create a lookup field Previously Approved Request that refers to the newly created list instead of referring back to the same list.
  • In your workflow, add a new action to add a new item to the newly created list when an item approved.
  • Now, The lookup field Previously Approved Requestthat refers to another list should be shown in your SharePoint Designer Workflow.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top