Sharepoint工作流程 - 按名称获取内容类型ID [英] Sharepoint Workflow - Get Content Type ID by name

查看:78
本文介绍了Sharepoint工作流程 - 按名称获取内容类型ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

首先 - 我是新手,也许我试图以完全错误的方式解决问题......

first of all - I'm a newbie and maybe I try to solve the problem in a completely false way...

我有一个包含不同内容类型的项目列表(List1)。所有这些项目都具有参数"State"。一旦"状态",得到一定的值,我需要在List2中创建一个项目,它也支持不同的内容类型。对于List1中的每个内容
类型,List2中有相应的内容类型。这两个列表都有不同的结构。如果List1中的项具有List1ContentType1等,则List2中新创建的项应该获得List2ContentType1。

I have a list of items (List1) with different content types. All these items have a parameter "State". As soon as "State" gets a certain value, I need to create an item in List2, which also supports different content types. For each content type in List1 there is a corresponding content type in List2. These both lists have a different structure. The newly created item in List2 should get a List2ContentType1 in case the item in List1 had List1ContentType1 etc.

内容类型的数量不是常量,并且将来可能会增长。

The number of content types is not constant and can grow in the future.

实现它的最佳方法是什么?我想,如果我将两个列表中的内容类型命名为相似,我可以根据第一个内容类型来形成第二个内容类型名称。但我只能通过其ContentTypeID为项目设置内容类型。是否有可能
在工作流程中按名称获取ContentTypeID?

What is the best way to realize it? I thought, if I name the content types in both lists similar, I could form the second content type name based on the first one. But I can only set a content type for the item by its ContentTypeID. Is there a possibility to get ContentTypeID by its name in the workflow?

或者有更简单的方法吗?

Or is there a much easier way?

谢谢




 

 




推荐答案

嗨Stern79,

Hi Stern79,

对于您的请求,我建议您在工作流程中使用"if any value equals value"条件和"create list item"操作。

For your request, I recommend you use "if any value equals value" condition and "create list item" action in the workflow.

创建与列表1关联的工作流程。使用"if any value equals value"条件来区分列表1中的内容类型,并在列表2中创建具有相关内容类型的项目。您可以按照以下工作流程执行:

Create a workflow associated with list 1. Use "if any value equals value" condition to distinguish the content type in list 1 and create an item in list 2 with relevant content type. You can follow the workflow steps below:

然后在工作流程设置页面中,我们可以勾选"创建/更改项目时自动启动工作流程",如下所示:

Then in the workflow settings page, we can tick "Start workflow automatically when an item is created/changed" as below:

祝你好运,

Grace Wang

Grace Wang


这篇关于Sharepoint工作流程 - 按名称获取内容类型ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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