自动填充列表项(New Item) [英] Auto Populate in a list item ( New Item )

查看:67
本文介绍了自动填充列表项(New Item)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我可以知道,如果我想显示请求编号",则可能例如,当用户单击时,AB-20180329-001(AB-yyyymmdd-ID) 新商品" .

can i know, it's that possible if i want to display the "Request No" such as AB-20180329-001 ( AB-yyyymmdd-ID) when user click "new Item".

我的无请求栏"等于单行文本.所以我想把代码放在计算值中.有可能吗?

My Request No Column is equal to single line text. so i want to put the code in calculate value. it's that possible? 

我该怎么做?

请帮助我.谢谢...

Please help me. Thank you...

推荐答案

Unique _,

Hi Unique_,

如果要使用请求编号"列中的默认ID列,则在创建新项目时默认ID列中没有值.   创建新项目后,默认ID列中就有值.因此,在创建新项目时,我们无法获取默认ID列的值.

If you want to use default ID column in the Request No column, there is no value in default ID column when you create the new item.  After you create the new item, there is value in the default ID column. So, we cannot get the value of the default ID column when creating new item.

有一种解决方法.

创建新项目后,我们可以使用工作流更改申请编号"列.并将开始选项设置为允许手动启动此工作流程"和在创建项目时自动启动工作流程.".

We can use workflow to change the Request No column after creating the new item. And set the start options as "Allow this workflow to be manually started" and "Start workflow automatically when an item is created.".

在工作流程中,我们可以获取当前日期.

In workflow, we can get the current date.

然后添加从字符串开头提取子字符串"操作,从日期字段中复制4个字符,选择ISO格式的日期并将其放在Year变量中.

And then add "Extract substring from start of string" action, copy 4 characters from the date field, pick the ISO formatted date and put that in the Year variable.

然后添加从具有长度的索引中提取字符串的子字符串"操作,从日期字段中复制,选择ISO格式,从5开始代表2个字符,并将其放在month变量中.

And then add "Extract substring of string from index with length" action, copy from the date field, pick the ISO formatted, starting at 5 for 2 characters and put that in the month variable.

然后添加从具有长度的索引中提取字符串的子字符串"操作,从日期字段复制,选择ISO格式,从8开始的2个字符,并将其放入day变量中.

And then add "Extract substring of string from index with length" action, copy from the date field, pick the ISO formatted, starting at 8 for 2 characters and put that in the day variable.

毕竟,请设置请求编号"列.

After all, set the Request No column.

整个工作流程如下:

结果如下:

最诚挚的问候,

萨拉范


这篇关于自动填充列表项(New Item)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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