Skip to main content

Application of numbers in strings

Sometimes the numbers of text components also need to be calculated, such as scoring with drop-down boxes, and then counting the total score. At this time, you need to write the option values in the number format before calculating.

1. Statistics of single-choice scoring

Service and quality are all single-choice topics. After scoring, you need to add them to get the total score.

Score form

The display value and option value of the single choice are both numbers. What results will be obtained if the values are directly added? As can be seen in the following figure, if the formula is directly edited as service + quality, the result is the addition of two scores (that is, the two numbers are added together),1+3=4.

Score Formula calculation

2. Judgment of whether it is a pure number

VALUE (text). If the text is composed of pure numbers, the return VALUE is the corresponding number. If it is not a pure number with text, symbols, etc., no return VALUE is returned. Based on this feature, we can determine whether a string is a pure number.

For example, if you fill in the bank card number, you must submit it only by a pure number, then you can fill in the formula in the form verification (if the process is enabled, write it on the node verification).

The following code can be directly copied to the formula editor,Replace the bank card number field.

{"text":"EQ(VALUE(​银行卡号​),\"\")","marks":[{"from":{"line":0,"ch":9,"sticky":null},"to":{"line":0,"ch":15,"sticky":null},"value":"textField_ksj61zrl","invalid":false}],"isCmData":true}

Formula verification

When submitting data, if the bank card number is not a pure number and contains other words, symbols, etc., the data cannot be submitted.

Verification reminder

YIDA in order to better optimize the content and quality of YIDA user manual, it takes you 3-5 minutes to fill in the document feedback questionnaire. The document feedback questionnaire is submitted anonymously, and the questionnaire information is only used for YIDA document experience feedback collection. Thank you for your support for YIDA!

Click here to fill in the questionnaire

-------------------- Get the latest information YIDA, welcome to follow US--------------------

This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4