Transcript:
0:00 hi everyone mike from north52 here
0:03 in today's video we will show how a
0:05 decision table can be used to enforce
0:07 conditional validation rules on an
0:09 account
0:12 so the business requirement for this
0:14 scenario is as follows
0:16 if an accounts category is set to
0:18 preferred customer
0:20 or if the account's credit limit is
0:22 greater than 100 000
0:24 we want to make sure that the address
0:26 fields are all filled in
0:29 if the address fields are not filled in
0:32 we want to throw an error message
0:34 telling them which fields
0:36 need to be filled this scenario
0:39 is useful when you want to explicitly
0:41 tell the user
0:42 what they need to do rather than just
0:44 give them a general warning
0:46 so let's have a look at the decision
0:47 table so as you can see here in the
0:50 first column
0:52 we have a conditional check on the
0:54 category field to make sure that the
0:56 account is set to preferred customer
0:59 in the second column we are checking
1:01 that the credit limit is greater than a
1:03 hundred thousand
1:04 note that the two columns here are
1:07 grouped together
1:08 with an or clause this ensures that
1:11 either one of these conditions must be
1:12 met
1:13 to continue the decision table then
1:16 checks
1:16 each of the addresses to see if they
1:18 contain data
1:20 if they don't the decision table will
1:22 add the corresponding string
1:24 to a variable called validation fields
1:27 each line of this sheet is executed
1:29 so the variable will build up a
1:31 concatenated string
1:32 of whatever fields are missing finally
1:36 the conditions here in column i checks
1:39 to see
1:39 does the variable validation fields
1:41 contain anything
1:43 i.e have any fields not contained data
1:46 if this variable does contain data the
1:49 decision table will return
1:50 the final validation message
1:57 this final validation message is made up
1:59 of a string at the start
2:01 and the validation fields variable which
2:04 is now a list of all the fields
2:06 that did not contain data so let's see
2:09 this in action
2:10 here is an account record and we will
2:14 set the category to preferred customer
2:17 and we will fill out only some of the
2:19 address fields
2:23 when we go to save we can see
2:27 that there's an error prompt like so and
2:30 then
2:30 if we fill in some of the fields
2:33 and then click save again you can see
2:36 that the message has been updated
2:40 thank you for watching and if you have
2:41 any questions about how North52 can
2:44 help your organization
2:45 please get in touch also please
2:48 subscribe to our youtube channel
2:50 by clicking the subscribe button
