我正在创建一个表单,它将为报表类型生成顺序编号。每个数字都是顺序的,所以第一个报告是第一个,第二个报告是第二个,依此类推。
问题是,报表号必须是4位,如果报表号不足以生成4位数字,请用0填写。
例如:报表1编号为0001,报表号码为0002,报表号码为0010,报表号码为0100。
我正在考虑在报表编号中添加4 0,并做一个子字符串公式,但问题是我不知道起始数。
感谢你的帮助
发布于 2014-12-10 08:12:14
我建议在用户提交报告号后生成报告号,这样您就可以获得sharepoint列表id号,然后应用如下简单规则:
Condition:
If Id does not match pattern Custom Pattern: \d{4}
Run this Actions
Set reportNumber's value: result = concat (substring("0000", 1 , 4 - string-length(Id))
Check the box to prevent the next rule to run when the condition is met
Add a new rule under this one just to print the Id if the condition is met.这样,4位以下的数字就会连在一起,只有4位数字的ids才会被显示出来。
希望这能帮到你。
https://stackoverflow.com/questions/27390332
复制相似问题