简体   繁体   English

Sharepoint查找工作流程无法正常工作

[英]Sharepoint Lookup workflow does not work properly

I have an issue with the lookup function within SharePoint Designer 2010 . 我在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. 在“ 测试”中,我使用查找字段来选择“ 注册”字段,并在屏幕截图上选择一个名为“ Uitkomst”的结果字段。 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. 它试图在“飞机”列表中找到一个项目,其“ ID”列值等于“测试”列表中当前项目的“ ID”列值,这没有任何意义。

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. 您可以让SharePoint使用现有的查找连接自动填充它,而不是使用工作流更新Uitkomst列值。

In your Testing list, go to list settings, then edit the column named "lookup". 在“测试”列表中,转到列表设置,然后编辑名为“ 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. 默认情况下,该列将使用名称“ lookup:Aircraft”创建,但是您可以在创建后对其进行重命名。

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. 如果“飞机类型”本身就是“飞机”列表上的查找列,那么您将无法以这种方式进行查找。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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