自动填充ID [英] Autopopulate ID

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

问题描述

大家好,


 如何自动填充此类唯一ID  WR-001,WR-002 在Sharepoint Web浏览器中提交infopath表单之前,即在创建新项目时,此唯一ID应自动填充,这意味着我在命名此项目或在提交之前将
表示为唯一ID。提交表单后,使用此唯一ID创建表单。对于下一个项目,它应该自动填充下一个数字。 WR-002等我在提交后能够获得唯一的ID,但我的要求是,它应该在提交之前在表格中自动填充
。任何人都可以帮忙吗?


问候,


Jay


解决方案

旧学校这样做的方法是使用带有ID的Right


()。


所以,如果你想要一个4位数的数字,那么你取4的"0000"的权利。与ID连接。


赞:myVar = Right


(" 0000",ID,4)


(我认为SharePoint使用了Substring的命名法,所以你必须调整代码以适应语法。)


为了适应WR-,它会看起来类似于:


myVar =" WR-" &安培;右


Hi All,

  How to autopopulate unique ID like this  WR-001, WR-002  etc before submitting the infopath form in Sharepoint Web browser i.e when the new item is being created, this unique ID should autopopulate which means I am naming this item or form a unique ID before submitting. After submitting the form is being created with this unique ID. For the next item it should autopopulate the next number for ex. WR-002 etc. I was able to get the unique ID after submit but my requirement is, it should autopopulate in the form before submit. Can anyone help on this?

Regards,

Jay

解决方案

The old school method of doing this was to use a Right


() with the ID.

So, if you want a 4 digit number, then you take the Right of 4 of "0000" concatenated with the ID.

Like: myVar = Right


("0000",ID,4)

(I think SharePoint uses the nomenclature of Substring, so you'll have to adapt the code to fit the syntax.)

To tack on the WR-, then it would look something like:

myVar = "WR-" & Right


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

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