Skip to main content

Judge grades based on grades

In the process of building YIDA applications, you may encounter the following problems.

  • In student record card, students should be judged according to their grades (excellent, good, passed, failed)
  • In customer evaluation, customer satisfaction (satisfaction, average, dissatisfaction) needs to be judged according to the total score of customer evaluation.

Prerequisites

This tutorial uses the form formula of YIDA. You can first understand the followingForm formula.

Effect

Implementation steps

Create a common form page

Create a common form page. For more information, seeCommon form.

Drag the following components into the canvas area.

  • Numerical value: named score
  • Single line text: Named as level

Add Form formula

Logically, we need to use the formula to judge the score and output the corresponding level.

  • Excellent: score> =(GE) 90
  • Good: score> =(GE) 75
  • Pass: score> =(GE) 60
  • Fail: none of the above is satisfied

Select Formula edit for the level field and configure the formula shown in the following figure. You can also directly copy the formula source code and modify the field.

{"text":"IF(GE(​分数​,90),\"优秀\",IF(GE(​分数​,75),\"良好\",IF(GE(​分数​,60),\"及格\",\"不及格\")))","marks":[{"from":{"line":0,"ch":6,"sticky":null},"to":{"line":0,"ch":10,"sticky":null},"value":"numberField_lyy0s65c","invalid":false},{"from":{"line":0,"ch":26,"sticky":null},"to":{"line":0,"ch":30,"sticky":null},"value":"numberField_lyy0s65c","invalid":false},{"from":{"line":0,"ch":46,"sticky":null},"to":{"line":0,"ch":50,"sticky":null},"value":"numberField_lyy0s65c","invalid":false}],"isCmData":true}

Save page

Video tutorial

Try it online

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