How to count number of semicolon in the Textbox field In Infopath 2013?

感情迁移 提交于 2019-12-12 03:36:49

问题


Field A Value Is : Test1;Test2;Test3;Test4

I need to count number of semicolon present in Field A Like : 3

its possible to do this without coding?


回答1:


Try this: Field A: Test1;Test2;Test3;Test4

Field B(default value): string-length(translate(FieldA, "1234567890ABCDEFGHIJKLMNOPQRSTVWXYZabcdefghijklmnopqrstuvwxyz", ""))

Result: 3

Translate function is to convert the other characters to blank(no space) and then using string-length to count the semicolons that are left.

EDIT: Created a blog post for this one for detailed explanation and steps.



来源:https://stackoverflow.com/questions/31561609/how-to-count-number-of-semicolon-in-the-textbox-field-in-infopath-2013

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!