> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Formula Examples

> This page provides case documents for various function formulas, covering scenarios from retrieving parent department names to calculating discounted prices. Each case lists the functions involved. Click a case name to jump to the detailed configuration page.

**This article lists the available case documents for function formulas. Click a case name to jump to the detailed configuration page, as shown below:**

| **Case link**                                                          | **Functions involved**                        |
| ---------------------------------------------------------------------- | --------------------------------------------- |
| Retrieve the parent department name                                    | DEPTNAME                                      |
| Limit annual leave days                                                | DAYS                                          |
| Determine grade level based on score                                   | IF                                            |
| Generate a random string of fixed length                               | UUID                                          |
| Automatically calculate the Chinese zodiac sign from an ID card number | IF, EQ, MOD, LEN, VALUE                       |
| Automatically calculate gender from an ID card number                  | IF, EQ, MID, OR                               |
| Automatically calculate province from an ID card number                | IF, EQ, MID, LEN, VALUE                       |
| Retrieve date of birth from an ID card number                          | IF, EQ, MID, CONCATENATE, LEN                 |
| Automatically calculate the constellation from an ID card number       | IF, EQ, MID, LEN, VALUE, GE, AND, LE          |
| Automatically calculate age from an ID card number                     | IF, EQ, LEN, VALUE, TODAY, TEXT, RIGHT, LEFT  |
| Mask part of a phone number                                            | REPLACE                                       |
| Randomly select questions                                              | Code implementation                           |
| Convert text to date format                                            | MID, DATE, TIMESTAMP                          |
| Automatically add ten days to a date                                   | DATEDELTA, DATE, IF, ISEMPTY                  |
| Latest personal income tax calculator                                  | IF, AND, EQ, LE, GT                           |
| Calculate the average score across multiple judges                     | MAX, VALUE, ARRAYGET, SPLIT, MIN, CONCATENATE |
| Change the title size                                                  | Code implementation                           |
| Set percentage format                                                  | TEXT                                          |
| Automatically generate an email address from a QQ number               | IF, ISEMPTY, CONCATENATE                      |
| Set the number of decimal places                                       | ROUND                                         |
| Convert numbers to uppercase                                           | RMBFORMAT, INT                                |
| Work with numbers inside strings                                       | EQ, VALUE                                     |
| Calculate years of service                                             | INT, DAYS, DATE, IF, OR, ISEMPTY              |
| Allow each user to submit only one record per day                      | USER, SYSTIME, TIMESTAMP, TEXT, DATE, EXIST   |
| Calculate the discounted price                                         | SUM, IF, LT                                   |
| Split an invoice amount                                                | IF, GT, AND, LE, RIGHT, LEFT, INT             |
| Generate a serial number in a fixed format                             | COUNT                                         |
| Retrieve the manager                                                   | DEPTNAME                                      |
| Retrieve the end time of a date range using a formula                  | MID, SEARCH                                   |
| Explanation of common YiDA tips                                        | //                                            |
