如何将子任务的任务名称自动设置为父任务名称 [英] How to set the Task Name of SubTask automatically as Parent Task Name

查看:286
本文介绍了如何将子任务的任务名称自动设置为父任务名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,

有一个任务列表,我尝试在其中自动设置子任务的任务名称,例如,我要添加一个任务并指定一个任务名称- 访问英国,我想为此添加一个 SubTask 任务名称应自动设置为访问英国.我该如何做到这一点.

There is a Task List in which i am trying set the Task Name of Sub Task automatically, for example i am adding one Task and giving a Task Name - Visit To UK and i want to add a SubTask to this and the Task Name should be automatically set to Visit to UK. How can i achieve this.



推荐答案

如果我要创建这种自相关类型的列表,我将有一个名为ParentTaskID的字段,该字段返回到Task.ID(父代的ID.)通过此功能,可以在以下情况下选择TaskName来显示父代任务的名称: 您可以创建ParentTaskID字段.我之所以这样说,是因为我不同意在您已经可以免费获得父任务名称"的情况下复制它的需要.

If I were making this self-relational type of list, I would have a field, called ParentTaskID, that refers back to the Task.ID (The ID of the parent.) With that, there is the ability to display the name of the Parent Task, by selecting the TaskName when you create the ParentTaskID field.  I say this, as I don't agree with the need to duplicate the Parent Task Name, when you can already get it for free.

但是,我承认我并不了解所有情况,并声明如果您想自动执行该名称的填充,那么您可以使用SharePoint 2010 WorkFlow并将其关联到列表.

But, I'll admit to not knowing everything, and state that if you would like to automate the population of the name, then you could use a SharePoint 2010 WorkFlow, and associate it to the list.

从那里开始,在创建新项目时,您首先要检查该项目是否为子任务项目". (我不确定您使用什么来识别它,但是不管它是什么,请适当地创建代码.同样,我将有一个ParentTaskID并检查是否 它具有一个值,或者就像不等于零(0)一样简单.)

From there, when a new item is created, you would first check to see if the item is a Child Task Item. (I'm not sure what you're using to discern this, but whatever it is, create the code appropriately. Again, I would have a ParentTaskID, and check that it has a value or maybe just as simple as Not Equal To Zero (0).)

如果这是子任务,则使用WF查找功能,从另一个列表(或类似列表)获取项目,并进行适当的编码以返回父任务名称.您可能必须将其写入WF变量.

If it is a subtask, then use the WF lookup feature, Get Item from Another List (or something like that), and code appropriately to return the Parent Task Name. You may have to write this to a WF Variable.

获得名称后,您可以使用父任务名称更新子任务.

Once the name is obtained, then you can update the Subtask with the Parent Task Name.


这篇关于如何将子任务的任务名称自动设置为父任务名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆