Skip to Content
avatar image
Former Member

Is there possible add formula inside SAP Business ONE custom field??

for example, first field + second field = third field, confirm what I want is more difficult than 1+1 = 2, Just want to know is there possible to add formula into field?

Below show the image I try to open Meter Reading tab to edit, however cannot open to view tab inside Visual Studio for SAP B1.(same thing happen when I open inside SAP Business Studio)

untitled.jpg (197.6 kB)
untitled2.jpg (279.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 29, 2017 at 10:52 AM

    Hi Chris,

    For this purpose we have the Formatted Search (popularly known as FMS). The FMS allows you to apply formulas using SQL code.

    So for example if you want first field + second field = third field then you apply an FMS with a query, and regular refresh to the third field. The query would look something like this: SELECT $[table.FirstField] + $[table.SecondField]

    Only drawback of FMS for your scenario, is that it only allows for a single triggering field, so either first field or second field, but not both.

    Regards,

    Johan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 30, 2017 at 08:14 AM

    Johan

    Thank you for reply.


    How if we create a totally new form by add on, so that i can put formula in the field I want through SAP Busines ONE visual studio.

    But problem is
    1) How create new table in database, I create table "MASTERDATA" inside the SQL database, but when I use it inside visual studio datasource, when I execute it, it show tables not found?

    2) What code need for find, add and cancel button in this SAP B1, just normal code for c# window form?

    3) When I click add in new form, is that new form can use "previous" , "next" , "first", and "last" button?

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Chris,

      Those are a lot of different questions. Please post separate questions for each, and make sure the tag is SAP Business One SDK

      Please also change the tag for this question to SAP Business One SDK

      Regards,

      Johan