1
00:00:05,240 --> 00:00:10,340
In this section, we're going to begin creating our production defect tracking application.

2
00:00:10,340 --> 00:00:17,480
We're going to create an overview screen as well as some placeholder screens for our operator repair

3
00:00:17,480 --> 00:00:18,770
and supervisor.

4
00:00:18,770 --> 00:00:22,580
We're going to create a pop up for our Manage Staff screen.

5
00:00:22,580 --> 00:00:30,920
And we're going to create a view for our defect tracking table to show our current defects in a web

6
00:00:30,920 --> 00:00:31,430
browser.

7
00:00:31,430 --> 00:00:33,080
So let's get started.

8
00:00:33,440 --> 00:00:38,630
So now we have everything we need to create our defect tracking user interfaces.

9
00:00:38,630 --> 00:00:42,620
Let's walk through doing this I'm going to create a new screen.

10
00:00:42,620 --> 00:00:46,940
And I'm going to set the width and height as I want them.

11
00:00:46,940 --> 00:00:50,990
You're going to be building the same thing in the next assignment.

12
00:00:51,170 --> 00:00:58,190
I turn off my global color scheme, and this is going to be my main page for the application.

13
00:00:58,190 --> 00:01:00,350
So we'll go ahead and save this.

14
00:01:00,350 --> 00:01:06,110
I am going to save this as my defect tracking main screen.

15
00:01:06,110 --> 00:01:06,890
And.

16
00:01:07,950 --> 00:01:11,610
I will just throw up a banner here.

17
00:01:11,910 --> 00:01:20,220
Let's put in defect tracking and give it 36 font and just kind of dress it up a little bit and I'll

18
00:01:20,220 --> 00:01:26,940
turn off my global color scheme and just add the little 3D effect that we've been doing.

19
00:01:26,940 --> 00:01:30,060
So we'll just kind of make this black.

20
00:01:30,060 --> 00:01:35,550
Or we could even go kind of a charcoal color, send it back.

21
00:01:35,580 --> 00:01:36,480
There we go.

22
00:01:36,720 --> 00:01:39,120
And I'm going to give this a white font.

23
00:01:39,120 --> 00:01:43,560
And so we're going to need screens and a picture window.

24
00:01:43,560 --> 00:01:46,920
And so first I'm just going to grab a picture window.

25
00:01:46,920 --> 00:01:53,460
And the way that I'm going to do this is we're going to have one screen that just shows our defect records

26
00:01:53,460 --> 00:01:55,530
from our production defect tracking table.

27
00:01:55,530 --> 00:02:00,720
And so it's geometry is going to be 1080.

28
00:02:00,720 --> 00:02:03,720
And it's going to be a height of about 600.

29
00:02:03,720 --> 00:02:08,430
And then this picture window I'm just going to go ahead and name this.

30
00:02:08,430 --> 00:02:10,980
I'm real big on naming objects.

31
00:02:11,370 --> 00:02:14,520
This is going to be P.W. for picture Window.

32
00:02:14,520 --> 00:02:18,030
And let's just call it Defect View.

33
00:02:18,030 --> 00:02:21,240
And then we're going to have another picture window object.

34
00:02:21,240 --> 00:02:27,090
And this is going to show our interfaces for operators and repairmen and things like that.

35
00:02:27,090 --> 00:02:29,400
And so it's geometry.

36
00:02:29,400 --> 00:02:34,620
We're going to make it 1080 by about 330.

37
00:02:34,620 --> 00:02:41,370
And we're going to go ahead and name this P.W. manage defects.

38
00:02:41,370 --> 00:02:43,230
And then we're going to add some buttons.

39
00:02:43,230 --> 00:02:47,550
And the idea here is the buttons will change what we see here.

40
00:02:47,550 --> 00:02:51,210
And in this picture window we'll always see our defect records.

41
00:02:51,210 --> 00:02:56,040
So I'm going to go grab some windows buttons.

42
00:02:56,160 --> 00:03:00,000
And so the first one is just going to be what.

43
00:03:00,000 --> 00:03:03,120
Just keep it simple operator.

44
00:03:03,120 --> 00:03:06,570
And go ahead and set our font and everything.

45
00:03:07,490 --> 00:03:08,930
I'll duplicate that.

46
00:03:10,030 --> 00:03:14,020
And this is going to be hair interface.

47
00:03:14,020 --> 00:03:15,940
Duplicate this again.

48
00:03:15,940 --> 00:03:21,010
And this is going to be our supervisor interface.

49
00:03:21,190 --> 00:03:23,710
And then a couple other things that we want.

50
00:03:23,710 --> 00:03:27,220
I'm going to add the manage staff.

51
00:03:27,220 --> 00:03:31,840
And we're going to show our existing staff screen as a pop up.

52
00:03:31,840 --> 00:03:33,550
And then I want one more.

53
00:03:33,550 --> 00:03:35,680
So I'll just duplicate this once more.

54
00:03:35,680 --> 00:03:39,490
This is going to be a button to show the error log.

55
00:03:39,490 --> 00:03:43,660
That way we're not having to go back to the file system every time.

56
00:03:44,080 --> 00:03:49,420
Let's take that space out of there and just kind of clean up a little bit.

57
00:03:49,420 --> 00:03:51,250
So I have this one selected.

58
00:03:51,250 --> 00:03:57,280
I'll hold my control key down, select all of those, make them all the same size.

59
00:03:57,280 --> 00:04:04,540
And then if we wanted to, we could just select one button and hit control A that selects all buttons.

60
00:04:04,540 --> 00:04:07,000
That's kind of a nice thing there.

61
00:04:07,000 --> 00:04:07,810
And then.

62
00:04:07,810 --> 00:04:11,320
Now I can just turn off my global color scheme for all of these.

63
00:04:11,320 --> 00:04:12,760
And so repair will do.

64
00:04:12,760 --> 00:04:16,090
Orange supervisor we're going to do kind of this.

65
00:04:17,560 --> 00:04:22,300
Actually this black color here, and I need to give it a white font.

66
00:04:22,300 --> 00:04:27,190
As a matter of fact, I'll hit control A again, give them all a white font then I don't know.

67
00:04:27,190 --> 00:04:29,650
Manage staff will do purple.

68
00:04:30,170 --> 00:04:32,840
And then show where a log will do kind of a read.

69
00:04:32,840 --> 00:04:35,030
So these are navigation buttons.

70
00:04:35,030 --> 00:04:37,220
I'll select these all again.

71
00:04:37,220 --> 00:04:39,980
Use my arrow keys to kind of tighten this up.

72
00:04:39,980 --> 00:04:41,660
Hit save okay.

73
00:04:41,660 --> 00:04:42,950
So I have some buttons.

74
00:04:42,950 --> 00:04:44,630
We have a couple of picture windows.

75
00:04:44,630 --> 00:04:48,560
Now we need to build placeholders for these pages.

76
00:04:48,560 --> 00:04:53,930
So for our defect tracking we made this 1080 by 600.

77
00:04:54,200 --> 00:04:57,170
So we're going to create a new screen.

78
00:04:57,970 --> 00:05:04,240
And we're going to make it 1080 by 600 and we'll turn off our global color scheme.

79
00:05:04,300 --> 00:05:06,940
And this is going to be our defect view.

80
00:05:06,940 --> 00:05:08,470
So I'm just going to hit save.

81
00:05:08,470 --> 00:05:12,490
And we're just going to call this defects view and hit save.

82
00:05:12,490 --> 00:05:16,750
And all we're going to do here is we're going to add a browser.

83
00:05:16,750 --> 00:05:22,600
And the idea is we're going to be showing our defect table information as an HTML like we've done before.

84
00:05:22,600 --> 00:05:28,150
I'm going to use in this case the CC web browser control instead of the chromium one.

85
00:05:28,150 --> 00:05:34,750
And I'm just going to kind of place this out like this kind of size it to the page for this particular

86
00:05:34,750 --> 00:05:35,140
object.

87
00:05:35,140 --> 00:05:38,890
It doesn't have a dialog that you double click to pop up.

88
00:05:38,890 --> 00:05:42,400
So I'll turn off status and turn off show navigation.

89
00:05:42,400 --> 00:05:45,880
So it looks basically like a big white square.

90
00:05:45,880 --> 00:05:50,110
We're going to come back and load this with our defects table.

91
00:05:50,110 --> 00:05:51,730
But I'll hit save here.

92
00:05:51,730 --> 00:05:53,800
And now I'm just going to create a new screen.

93
00:05:53,800 --> 00:05:59,320
This is going to be the template for our operator and repair supervisor interfaces.

94
00:05:59,320 --> 00:06:01,990
So it's geometry is going to be.

95
00:06:02,850 --> 00:06:05,640
1080 by 330.

96
00:06:05,670 --> 00:06:08,160
That's going to fit in the bottom window.

97
00:06:08,190 --> 00:06:10,380
Turn off our global color scheme.

98
00:06:10,380 --> 00:06:17,370
And for right now, I'm just going to add a static text that says to do.

99
00:06:17,400 --> 00:06:20,010
Create operator screen.

100
00:06:20,010 --> 00:06:24,180
And this is going to be the screen where the operator adds in the defects.

101
00:06:24,270 --> 00:06:27,330
I'm going to up the font here so that you can read that.

102
00:06:27,720 --> 00:06:28,980
I'll hit save.

103
00:06:28,980 --> 00:06:30,810
And this is going to be.

104
00:06:31,650 --> 00:06:32,610
Operator.

105
00:06:32,940 --> 00:06:38,880
And then I'm going to do file save as we're going to call this repair.

106
00:06:39,030 --> 00:06:42,780
So I'll just change this here on repair.

107
00:06:42,780 --> 00:06:46,560
So this is now the repair screen I'll save that.

108
00:06:46,560 --> 00:06:49,530
We're going to do save as one more time.

109
00:06:49,530 --> 00:06:51,990
This is going to be the supervisor screen.

110
00:06:52,200 --> 00:06:53,850
And we'll hit save.

111
00:06:54,430 --> 00:06:56,260
Change this to supervisor.

112
00:06:56,260 --> 00:06:59,140
And now let's go back to our main screen.

113
00:06:59,140 --> 00:07:05,110
This window is going to show always our defect tracking which is this defects view.

114
00:07:05,110 --> 00:07:06,820
So we can go ahead and assign it.

115
00:07:06,820 --> 00:07:12,280
So for this picture window we'll hit miscellaneous I'm going to turn the border on just because it looks

116
00:07:12,280 --> 00:07:12,910
better.

117
00:07:12,910 --> 00:07:16,450
But I don't want to be able to move it around or close it or anything.

118
00:07:16,450 --> 00:07:21,190
And we're going to find the picture name and just double click on this.

119
00:07:21,370 --> 00:07:24,460
And this is going to be my defects view.

120
00:07:24,790 --> 00:07:26,980
And so by default it's just going to show it.

121
00:07:26,980 --> 00:07:28,870
Right now it's just a big white square.

122
00:07:28,870 --> 00:07:36,100
And then to set up our navigation for this picture window the name of it is Manage Defects.

123
00:07:36,100 --> 00:07:37,540
We need to remember that.

124
00:07:37,540 --> 00:07:41,920
And so for our operator I'm going to hit my events tab.

125
00:07:42,160 --> 00:07:45,970
And we're just going to use a direct connect to cause navigation.

126
00:07:45,970 --> 00:07:49,540
When you release the left button we're going to trigger this.

127
00:07:49,540 --> 00:07:51,190
We'll just choose constant.

128
00:07:51,610 --> 00:07:53,470
This is our picture browser.

129
00:07:53,470 --> 00:07:56,320
And we're just going to put the operator screen.

130
00:07:56,320 --> 00:08:01,660
And the target is going to be our managed defects picture name.

131
00:08:01,660 --> 00:08:08,470
So what's going to manipulate that same property picture name and cause it to show that screen.

132
00:08:08,860 --> 00:08:11,170
We're going to do the same thing with repair.

133
00:08:11,170 --> 00:08:17,830
So I'll right click Do Direct Connect and we'll use a constant and we'll do our repair.

134
00:08:18,190 --> 00:08:19,930
Go to the same picture window.

135
00:08:19,930 --> 00:08:21,490
We will do picture name.

136
00:08:21,850 --> 00:08:25,270
And then finally we'll do the same thing with supervisor.

137
00:08:25,270 --> 00:08:30,250
So here's my supervisor screen manage defects picture name.

138
00:08:30,250 --> 00:08:32,110
And we can test this out.

139
00:08:32,110 --> 00:08:35,080
We'll just hit save here and go to runtime.

140
00:08:35,080 --> 00:08:39,400
So by default we are showing just a blank web browser.

141
00:08:39,400 --> 00:08:40,690
It doesn't have anything in it.

142
00:08:40,690 --> 00:08:42,010
We don't see anything down here.

143
00:08:42,010 --> 00:08:46,240
But when I hit operator then it shows the operator screen.

144
00:08:46,240 --> 00:08:47,320
There's our repair screen.

145
00:08:47,320 --> 00:08:48,250
There's supervisor.

146
00:08:48,250 --> 00:08:52,510
Now if we want it to also have this border, we can just go down.

147
00:08:53,390 --> 00:08:57,560
Grab this guy here and turn the border on.

148
00:08:57,800 --> 00:08:59,990
Then save it and go back to runtime.

149
00:08:59,990 --> 00:09:04,700
And it's only going to show the border, of course, when it's actually showing a screen.

150
00:09:04,700 --> 00:09:09,110
So the next thing we'll do right now is just default this to the operator screen.

151
00:09:09,110 --> 00:09:15,710
And so for this picture window by default see how picture name is italicized.

152
00:09:15,710 --> 00:09:20,480
That means that a direct connect is affecting this property on this page.

153
00:09:20,480 --> 00:09:22,370
So that's just some good information.

154
00:09:22,370 --> 00:09:26,630
And we're going to default it to the operator dot PDL.

155
00:09:26,630 --> 00:09:29,330
So you can see it shows a preview.

156
00:09:29,780 --> 00:09:33,350
And so now by default we're going to show the operator screen.

157
00:09:33,890 --> 00:09:35,510
So we've got something to show.

158
00:09:35,510 --> 00:09:40,790
And so let's set up our manage staff because we're going to need to add a few staff members.

159
00:09:40,790 --> 00:09:46,370
And for that we can go back to an example we did earlier in the class.

160
00:09:46,460 --> 00:09:48,620
And it was on my first screen.

161
00:09:48,620 --> 00:09:51,320
And we have a manage staff button here.

162
00:09:51,320 --> 00:09:54,470
And there's just a function called open screen and pop up.

163
00:09:54,470 --> 00:09:58,490
And it dynamically creates a picture window on the fly.

164
00:09:58,490 --> 00:10:05,900
And so I'm just going to copy this script and I'm going to put it on the manage staff release left paste

165
00:10:05,900 --> 00:10:06,770
that in there.

166
00:10:06,770 --> 00:10:10,160
And so basically this is the name of the screen.

167
00:10:10,160 --> 00:10:14,330
This is going to be the name of the pop up window that is automatically created.

168
00:10:14,330 --> 00:10:15,770
This is a tag prefix.

169
00:10:15,770 --> 00:10:17,240
You can see the arguments up here.

170
00:10:17,240 --> 00:10:21,950
We're not using tag prefix and we're not dynamically setting this.

171
00:10:21,950 --> 00:10:24,530
You can learn more about open screen and pop up.

172
00:10:24,530 --> 00:10:30,500
If you open the help for Winsock and search for this term, it shows you about this function.

173
00:10:30,500 --> 00:10:35,780
Also have a video on my YouTube channel that talks about using this function.

174
00:10:35,780 --> 00:10:37,520
So we'll click okay there.

175
00:10:37,520 --> 00:10:42,080
We'll click save and we'll just go to runtime and we can test this out.

176
00:10:42,080 --> 00:10:46,700
There's our pop up and we can see our staff and interact with that.

177
00:10:46,700 --> 00:10:48,830
So we're going to be using that in a moment.

178
00:10:48,830 --> 00:10:55,190
So next we want to get our view working for our production defect table.

179
00:10:55,190 --> 00:10:59,660
We can just go back to graphics designer see our defects view.

180
00:10:59,660 --> 00:11:04,100
And first on our work web browser control.

181
00:11:04,100 --> 00:11:08,390
We need to change this to web browser just to kind of keep it consistent.

182
00:11:08,390 --> 00:11:13,760
And then next we're going to go to the picture object itself to the events.

183
00:11:13,760 --> 00:11:18,560
And we'll use the open picture to put a script to load this.

184
00:11:18,560 --> 00:11:25,940
And we're going to use our build HTML for right now I'll just do select star from production defect

185
00:11:25,970 --> 00:11:27,710
tracking order by ID.

186
00:11:27,830 --> 00:11:36,680
Since this is the wink web browser object and not the chromium, we have to add an additional line in

187
00:11:36,680 --> 00:11:38,450
order for the refresh to work.

188
00:11:38,450 --> 00:11:42,260
And so first we just have to do about blank.

189
00:11:44,130 --> 00:11:49,560
And so that just constitutes a change of address which will cause this to update.

190
00:11:49,590 --> 00:11:50,760
We'll just click okay.

191
00:11:50,760 --> 00:11:53,550
And we're going to save and just go to runtime.

192
00:11:53,550 --> 00:12:01,260
And so of course this isn't going to be a very useful view because it's just got all of our ID fields

193
00:12:01,260 --> 00:12:05,520
rather than the actual operator name and station name and things like that.

194
00:12:05,520 --> 00:12:11,820
Also notice it looks a little funny because we have these nice cells here, and that's just a test entry.

195
00:12:11,820 --> 00:12:15,450
But here our cells are not there.

196
00:12:15,450 --> 00:12:19,680
So we're going to open up SQL Server Management Studio to see why.

197
00:12:19,680 --> 00:12:24,180
So in SQL Server Management Studio I'll just hit a new query window.

198
00:12:24,270 --> 00:12:27,630
I'll make sure we are looking at our production database.

199
00:12:27,630 --> 00:12:30,840
And we'll just do select star from.

200
00:12:30,840 --> 00:12:33,960
And I'll just do my drop down.

201
00:12:35,190 --> 00:12:37,350
And I'll do production defect tracking.

202
00:12:37,350 --> 00:12:42,030
And notice that we just have entries for the operator stuff.

203
00:12:42,030 --> 00:12:46,410
We don't have entries for our repair information or our supervisor information.

204
00:12:46,410 --> 00:12:47,760
So all of that is null.

205
00:12:47,760 --> 00:12:54,390
And what's happening is the VBScript is not handling that well and it's not processing that.

206
00:12:54,390 --> 00:12:57,510
So I'd like to go back and fix this situation.

207
00:12:57,510 --> 00:13:04,290
First we'll go to Winsock Control Center and go back to our VBScript editor.

208
00:13:06,210 --> 00:13:11,460
And in our SQL functions module, we'll just go to our build HTML.

209
00:13:11,460 --> 00:13:17,940
And what we're going to need to do is it's in this area where it's printing out the fields.

210
00:13:17,940 --> 00:13:23,670
And what's happening is this ends up being null, and the null just kind of skips over.

211
00:13:23,670 --> 00:13:25,830
And it doesn't always throw an error.

212
00:13:25,830 --> 00:13:26,490
As you can see.

213
00:13:26,490 --> 00:13:29,460
I just know this from experience.

214
00:13:29,460 --> 00:13:33,810
So what we're going to need to do is test this value for null.

215
00:13:33,810 --> 00:13:38,910
And if it is null then just replace it with a couple of dashes.

216
00:13:38,910 --> 00:13:41,040
So this is our loop.

217
00:13:41,040 --> 00:13:43,650
And I'm just going to paste in some code here.

218
00:13:44,640 --> 00:13:50,610
And basically the way that this works is I've created a variable V for value.

219
00:13:50,610 --> 00:13:56,850
It's going to use the Isnull function to test whether or not this is null.

220
00:13:56,850 --> 00:14:08,520
So for this line it's saying that if this value is not null, then set v to our value of our current

221
00:14:08,520 --> 00:14:09,390
field.

222
00:14:09,390 --> 00:14:15,390
But if it is null, just set it to a couple of dashes and then we have an endif.

223
00:14:15,390 --> 00:14:19,740
And then lastly we're just going to replace this with V.

224
00:14:20,500 --> 00:14:26,650
And so now whatever V ends up being either the value or the double dashes, it's going to end up in

225
00:14:26,650 --> 00:14:27,400
our cell.

226
00:14:27,400 --> 00:14:29,530
So I'm just going to save this.

227
00:14:30,170 --> 00:14:35,810
And we'll go back to defect tracking and we'll go to runtime.

228
00:14:35,810 --> 00:14:42,260
And now you can see that our values are double dashes for our null values.

229
00:14:42,290 --> 00:14:47,330
Now, later maybe we can do a center line or something to kind of clean this up.

230
00:14:47,330 --> 00:14:53,570
But the next thing I want to do is replace these ID fields with our actual names and descriptions.

231
00:14:53,570 --> 00:14:57,260
And so we're going to go back to SQL Server Management Studio.

232
00:14:57,260 --> 00:15:00,200
And in the first couple of lectures we created a view.

233
00:15:00,200 --> 00:15:05,120
And it resolved these relationships and showed our actual information.

234
00:15:05,120 --> 00:15:06,950
So we're going to do the same thing again.

235
00:15:06,950 --> 00:15:09,350
But we're going to learn a few new things here.

236
00:15:09,350 --> 00:15:11,630
So I'll right click and create a new view.

237
00:15:11,630 --> 00:15:14,630
Our primary table is going to be our production defect tracking.

238
00:15:14,630 --> 00:15:19,850
And for right now I'm just going to do our reason and our category.

239
00:15:19,850 --> 00:15:22,040
And then we'll come back and add these a little later.

240
00:15:22,040 --> 00:15:23,090
And I'll click add.

241
00:15:23,090 --> 00:15:25,190
And that's going to give us our tables.

242
00:15:25,190 --> 00:15:27,020
It's going to generate this SQL query.

243
00:15:27,020 --> 00:15:30,260
And it's going to do something called a join on these relationships.

244
00:15:30,260 --> 00:15:33,200
We're going to learn about join in the next section.

245
00:15:33,200 --> 00:15:39,080
But for now what we can do is just pick our columns that we want to show as our output.

246
00:15:39,080 --> 00:15:42,680
And the order that we pick these is going to put the order here.

247
00:15:42,680 --> 00:15:44,990
But of course we can go back and drag these around.

248
00:15:44,990 --> 00:15:51,020
And so for our production defect tracking table I'm going to want the ID the defect time.

249
00:15:51,020 --> 00:15:54,650
But I'm not going to choose the ID because I don't really care about the number.

250
00:15:54,650 --> 00:15:57,320
I care about our defect category.

251
00:15:57,320 --> 00:16:02,330
So I'll choose description and I care about our reason description.

252
00:16:02,330 --> 00:16:02,690
Okay.

253
00:16:02,690 --> 00:16:06,770
So as I'm clicking these it's adding these to our output.

254
00:16:06,770 --> 00:16:09,710
And you can see this is a SQL statement.

255
00:16:09,710 --> 00:16:13,580
So these are going to be our output columns.

256
00:16:13,580 --> 00:16:16,490
And we can come in and manually edit these.

257
00:16:16,490 --> 00:16:18,500
But let's just run this.

258
00:16:18,500 --> 00:16:20,510
So I'm just going to hit execute.

259
00:16:20,510 --> 00:16:23,120
And you can see our output here.

260
00:16:23,120 --> 00:16:24,500
Now we only have one record.

261
00:16:24,500 --> 00:16:26,330
And there's our ID and there's our time.

262
00:16:26,330 --> 00:16:30,290
It has resolved our category as assembly.

263
00:16:30,290 --> 00:16:32,660
And our reason as missing parts.

264
00:16:32,660 --> 00:16:38,990
And so I could just go to this description and just manually put in as category.

265
00:16:38,990 --> 00:16:43,250
And traditionally we can put these square braces around here.

266
00:16:43,250 --> 00:16:43,460
All right.

267
00:16:43,460 --> 00:16:44,810
So now it's called category.

268
00:16:44,810 --> 00:16:46,760
That makes this output a little bit better.

269
00:16:46,760 --> 00:16:53,420
And then expression one let's do reason and we will rerun that.

270
00:16:53,420 --> 00:16:56,000
And so now we've got some stuff that makes sense.

271
00:16:56,000 --> 00:17:04,010
Now if we want to go and add in our operator name, the operator is going to come from our staff table.

272
00:17:04,010 --> 00:17:06,410
So I'll right click in here and do add table.

273
00:17:06,410 --> 00:17:11,390
And we know that our staff is going to be in there.

274
00:17:11,390 --> 00:17:15,140
And the staff table references our roles table.

275
00:17:15,140 --> 00:17:16,880
So we're going to need both of these.

276
00:17:16,880 --> 00:17:18,200
And I'll click add.

277
00:17:18,200 --> 00:17:20,780
And I'll just kind of pull up here.

278
00:17:20,780 --> 00:17:24,320
What we want to do is maybe just put our last name.

279
00:17:24,320 --> 00:17:26,780
And let's just say we want to show the last name of the operator.

280
00:17:26,780 --> 00:17:30,290
But when I run my query, notice that I have no results.

281
00:17:30,290 --> 00:17:37,250
The reason is it's also looking at the repairman as well as our supervisor.

282
00:17:37,250 --> 00:17:39,500
And for this record, those are null.

283
00:17:39,500 --> 00:17:41,840
So it can't return anything.

284
00:17:41,840 --> 00:17:44,030
So we're it's filtering these records out.

285
00:17:44,030 --> 00:17:49,070
And so what we're going to have to do is come in and manually edit this.

286
00:17:49,070 --> 00:17:51,350
And it's creating this join.

287
00:17:51,350 --> 00:17:59,780
So it says okay look at our roles and do an inner join on the repairman ID and our operator we want

288
00:17:59,780 --> 00:18:02,780
to keep but the supervisor and the repairman we don't.

289
00:18:02,780 --> 00:18:08,930
And so I'm just going to get rid of this part and say, okay, let's not worry about the repairman ID

290
00:18:08,930 --> 00:18:09,740
right now.

291
00:18:09,740 --> 00:18:17,630
So we're doing the join where our operator is equal to our staff ID, but we also don't want the supervisor

292
00:18:17,630 --> 00:18:18,530
right now.

293
00:18:18,530 --> 00:18:24,500
And so if we try to run this now now we're going to get our relationships.

294
00:18:24,500 --> 00:18:31,940
And so when you have null values like we do right now in our repairman and our supervisor, these nulls

295
00:18:31,940 --> 00:18:34,220
are not going to allow us to have relationships.

296
00:18:34,220 --> 00:18:40,220
Now when we do start having information where our repairman and our supervisor and there we're going

297
00:18:40,220 --> 00:18:44,960
to have to find a way to go make those relationships on the records that have them.

298
00:18:44,960 --> 00:18:47,510
But we can kind of deal with that a little bit later.

299
00:18:47,510 --> 00:18:55,400
And so we can also go add in our operator station so I can right click and do add table.

300
00:18:55,400 --> 00:18:59,030
So we need stations and I'll click add.

301
00:19:00,360 --> 00:19:06,480
And of course we're going to have the same problem because it's going to try to do the supervisor station

302
00:19:06,480 --> 00:19:09,120
and it's going to try to do the repairman station.

303
00:19:09,120 --> 00:19:15,600
So we are just going to get rid of our supervisor station and the and statement.

304
00:19:15,600 --> 00:19:19,470
So we're just doing the join for production defect tracking.

305
00:19:19,470 --> 00:19:22,710
Operator station ID is in our stations table.

306
00:19:22,710 --> 00:19:26,040
And we're also going to get rid of our repair station.

307
00:19:26,040 --> 00:19:32,040
And of course we have to go in and say we want our station name as part of the output.

308
00:19:32,040 --> 00:19:35,340
And now we have our station.

309
00:19:35,340 --> 00:19:39,780
So this is going to give us a much nicer interface to look at.

310
00:19:39,780 --> 00:19:45,330
And one last thing I want to do, I want to get rid of the roles table.

311
00:19:45,330 --> 00:19:50,220
And I can get rid of that because we're not using any fields out of that table.

312
00:19:50,220 --> 00:19:52,740
It will still make the relationship without it.

313
00:19:52,740 --> 00:19:55,620
And then we're going to save this view.

314
00:19:55,620 --> 00:19:58,470
And we'll start this with a V for view.

315
00:19:58,470 --> 00:20:04,050
And we will do operator defect entries.

316
00:20:04,650 --> 00:20:06,960
And then we're going to right click refresh.

317
00:20:06,960 --> 00:20:08,790
It's going to show up down here.

318
00:20:08,790 --> 00:20:17,670
And I can do a new query window and just do select star from and pull out the name of our view.

319
00:20:17,670 --> 00:20:24,300
And we can actually just do a select statement against that just like we do for a table.

320
00:20:24,300 --> 00:20:27,510
And so here we can just use this.

321
00:20:28,740 --> 00:20:34,710
Go back to Graphics designer on Defects view and then on our script.

322
00:20:35,310 --> 00:20:43,260
I can just kind of paste this in here, click okay, save this, and then we'll just refresh runtime.

323
00:20:43,260 --> 00:20:46,440
And now we have a much nicer interface.

324
00:20:46,440 --> 00:20:53,190
It's not showing our repair supervisor stuff right now because we have not selected those from the view.

325
00:20:53,190 --> 00:20:59,580
And we will handle that later once we're putting in repair and supervisor entries.

326
00:21:00,960 --> 00:21:06,150
So that was part one of building our production defect tracking interfaces.

327
00:21:06,150 --> 00:21:12,120
In the next section, you're going to be building the operator repair and supervisor interfaces as well

328
00:21:12,120 --> 00:21:13,470
as showing the error log.

329
00:21:13,470 --> 00:21:19,980
In the meantime, you have an assignment coming up where you'll build the defect tracking application

330
00:21:19,980 --> 00:21:22,440
up to the point where we got it in this video.

331
00:21:22,440 --> 00:21:24,420
So see you in the next assignment.
