locked
Formula RRS feed

  • Question

  • User-1499457942 posted

    Hi

       I want to allow user to create formula like this .  It can be in some other way also.

           PurchaseAmount - (PercentVariable * SaleAmount) / 100

    Thanks

    Sunday, September 16, 2018 1:45 PM

All replies

  • User-893317190 posted

    Hi JagjitSingh,

    What do you mean by allowing user to create formula ?Could you describe it more Specifically?In c# or in javascript?

    What 's the background of your requirement?

    Do you want to allow the user to create formula, and the user could  provide parameters for the formula and calculate the result?

    If possible , could you provide your code?

    Best regards,

    Ackerly Xu

    Monday, September 17, 2018 9:19 AM
  • User-1499457942 posted

    Hi

       I wanted to allow user to write any formula in Textbox. That will be saved in database. Is there any other best way to do

    Thanks

    Monday, September 17, 2018 10:14 AM
  • User-893317190 posted

    Hi JagjitSingh,

    If so , because you need to save your data in database, you  need a button to save your data in database. You also need a user table  to record to whom the formula belongs to.

    That's to say, the user must have logged in .So your app should have login logic and register logic.

    About how to register and login , please refer to

    register https://www.aspsnippets.com/Articles/Simple-User-Registration-Form-Example-in-ASPNet.aspx

    login https://www.aspsnippets.com/Articles/Simple-User-Login-Form-example-in-ASPNet.aspx

    After that , you also need to create a formula table which references user table.

    When the user click the button, you should get the current user who has logged in and save your formula data with the formula's userId  equaling to the user's id.

    Best regards,

    Ackerly Xu

    Tuesday, September 18, 2018 1:38 AM