Views:

Transcript:

0:00 [Music]
0:05 hi everyone
0:05 mike from north52 here and in today's
0:08 video
0:09 we will show how a classic formula can
0:11 be upgraded to a decision table
0:13 there are a number of benefits to
0:15 upgrading a formula to a decision table
0:17 first it will make it easier to read and
0:20 understand for future users
0:21 both technical and non-technical second
0:25 the vast majority of the syntax is
0:27 handled for you and third
0:29 editing the formula is quick and easy
0:31 for this video
0:32 we will be upgrading a classic formula
0:34 that takes an invoice record and creates
0:36 a pdf invoice
0:37 this pdf is styled with html and is
0:40 generated using the north52 function
0:42 callrest api the formula then attaches
0:45 this pdf to a note related to the
0:47 invoice
0:47 to understand how this is done the
0:49 formula can be broken up
0:51 into five sections first
0:54 there is a validation to see if there is
0:56 an invoice number if the invoice number
0:58 field doesn't contain any data
1:01 the formula will notify the user and not
1:03 perform anything else
1:05 if the field does contain data the
1:07 formula will continue onwards
1:09 this can be done as a decision table
1:11 sheet like so
1:19 so if the validation is passed the
1:21 formula will loop over all the invoice
1:23 product items
1:24 and gather information from each record
1:27 it will then
1:28 generate a html table for them to be
1:30 added later to the pdf
1:33 this html table will have four columns
1:35 and their values will be decided by
1:37 conditional checks
1:39 so let's look at an example here note
1:42 how in the classic it can be difficult
1:44 to separate out which parts are together
1:46 and which aren't
1:47 however when we do this in a decision
1:49 table we can set up a number of
1:51 variables to make it easier to read
1:54 these variables are then combined with a
1:56 parameterized html
1:58 that is retrieved from an xcache record
2:00 to create the invoice details html
2:03 third the formula generates the body of
2:05 the html for the pdf
2:08 it does this by using conditional checks
2:10 from the invoice record
2:11 as well as the html table generated from
2:14 invoice details
2:15 note that this is quite long going for
2:17 more than three pages
2:19 making it very difficult to read
2:21 converting it into a decision table
2:23 all of this can be done in a similar way
2:25 as the previous invoice details sheet
2:28 we will create a number of variables and
2:30 these variables are combined with the
2:32 primaritized html
2:34 that is retrieved from xcast record to
2:36 create the invoice body html
2:42 this html body is then sent off to the
2:45 html pdf api
2:47 using the North52 rest api function
2:51 this function call will return a pdf so
2:54 this is what it looks like in a decision
2:55 table
2:56 note that we are referencing the
2:58 variable constructed in the previous
3:00 sheet
3:03 the pdf generated by the previous step
3:05 will be attached to a note related to
3:08 the invoice record
3:09 so it can be viewed in a decision table
3:11 we can break this into its own sheet
3:13 for better readability
3:18 and finally the formula expands a tab on
3:21 the form
3:22 which is called pdfs and refreshes the
3:25 web resource
3:26 called web resource underscore display
3:28 pdfs
3:29 which will show the pdf that has just
3:31 been generated
3:33 this can be done like so in the decision
3:36 table
3:41 thank you for watching and if you have
3:42 any questions about how north52 can help
3:45 your organization
3:46 please get in touch also please
3:49 subscribe to our youtube channel by
3:51 clicking the subscribe button