Dynamically "Custom Formula" calculation

Source: Internet
Author: User

These days to finish a "custom formula calculation" scheme, feel more interesting, here to share under!

The solution is for some users who need to define "calculation formulas" themselves, and then through this formula to calculate the results of this demand, particularly applicable with some products of the BOM (in the production of the BOM, you need to set the BOM in the number of each item, when this BOM in more complex time directly to set the number of items , this can not be satisfied, because some materials are related to some of them, so the data also want to use the formula to establish the relationship and the number of.

For example, a product consists of B and C, there is a certain correlation between B and C, the number of C is 2 with B, when this happens, users want to modify the number of B, and then linkage to modify the number of C, but these formulas need to allow users to define their own. The problem with this kind of test is that it can be done by this.

Probably can solve the problem, we should understand it! So how to use and rationale?

Let's start with the user perspective:

1, the user defines the following structure of the product BOM:

2, now go to need the relevant product set quantity formula, so as to achieve the effect of the linkage change

Formula for related products:

Product C:return [Product b]+[product D];

Product E:return [Product c]*2 + 10; .....

Here's a description of the formula: the parameters in the formula must be in "[]", must have return, in addition to these two, the other definition of the specification is the same as C #, because the internal is to convert these into code to execute. In fact, here, the definition of the formula for the user, or need to do some simple training, because the user to familiarize themselves with C # simple arithmetic calculation and some basic specifications.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.