简体   繁体   中英

Sharepoint Lookup workflow does not work properly

I have an issue with the lookup function within SharePoint Designer 2010 . It does not work properly. Can some one help me how I can solve this problem? I use two custom list Aircrafts and Testing . In Aircrafts I have two fields: Type of Aircraft and Registration . In Testing I use lookup field to choice the Registration field and a result field its called "Uitkomst" on the screenshot. In the result field I want to show the Aircraft type that is linked to the Registration of the aircraft.

Sometimes the lookup works when I create a new item! Sometimes it seems that the workflow doesn't fire up. I used log, to see if the workflows fire up and it does fire up. Most of the time when I create a new item the status is immediately set to completed. Its really rare I hope someone has an idea for me how to fix this.

测试列表截图

这是我的设置屏幕截图

What's the problem?

The problem has to do with the "Find the List Item" section of the "Lookup for Single line of text" dialog box from your screenshot.

It's trying to find an item in the "Aircrafts" list that has an "ID" column value equal to the current item's "ID" column value in the "Testing" list, which doesn't make sense.

If anything, you want to find an item in the "Aircrafts" list that has a "Registration" column value equal to the current item's "lookup" column value.

Consider an Alternative Approach

Instead of updating the Uitkomst column value with a workflow, you can have SharePoint automatically populate it using the existing lookup connection.

In your Testing list, go to list settings, then edit the column named "lookup". Click the checkbox for the "Type of Aircraft" field to create an additional lookup column that automatically fills in with the correct "Type of Aircraft" value when the user picks a "Registration" value for the lookup column.

The column will be created with the name "lookup:Type of Aircraft" by default, but you can rename it after it is created.

Note that this only works for certain field types, such as single line of text fields. If "Type of Aircraft" is itself a lookup column on the "Aircrafts" list, then you will not be able to pull it through in this manner.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM