如何在列表项中生成ID [英] How to generate id in list items

查看:81
本文介绍了如何在列表项中生成ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个称为文档"的列表.

I have list called Documents.

我又创建了一个名为status的列,其中已完成选择文件并正在进行中.

I created one more column called status which having choice fileds completed and in-progress.

根据完成的操作,我想生成一个像这样的0001-17IND的ID.

Based on completed i want to generate one id like this 0001-17IND.

任何帮助.

推荐答案

请考虑创建一个具有种子"属性的控件列表.您要使用的电话号码.例如,控制列表将具有一列和一个称为"SeedNumber"的字段.根种子编号0001(不确定逻辑是什么 17IND,但遵循相同的思维过程).当选择字段设置为已完成,有一个工作流程的运行,将获得从控制列表中的种子数,更新文件列,然后通过一个递增在控制列表中的种子数 因此您可以将其用于库中的下一个项目.

Consider creating a control list that has the "seed" number you want to use.  For example the control list will have one column and one field called "SeedNumber".  The root seed number of 0001 (Not sure what the logic is for 17IND but follow the same thought process).  When the choice field is set to completed, have a workflow run that will get the seed number from the control list, update the Documents column and then increment the seed number in the control list by one so you can use it for the next item in the library.

请确保将控制列表上的权限设置为只读,并以提升的特权运行工作流,以免用户意外更新.

Make sure to set permissions on the control list to read only and run the workflow with elevated privileges so users don't accidentally update it.

您可以对17IND部分使用相同的技术.

You can use this same technique for the 17IND portion.


这篇关于如何在列表项中生成ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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