Closed regiscamimura closed 8 years ago
@edgarf Just added system variables for:
I would use an underline to have the system variable to be named as $CURRENT_SCHOOL_YEAR, but I didn't to match the current configuration option name. Is that ok?
Also, note the $CURRENT_TERMID is an ID, a number, NOT a textual value. Is that ok?
Hi Regis,
Thanks a lot! Good on both
Edgar
On 29 Apr 2016, at 23:29, Regis Camimura notifications@github.com wrote:
@edgarf Just added system variables for:
$StaffUSI $CURRENT_SCHOOLYEAR $CURRENT_TERMID I would use an underline to have the system variable to be named as $CURRENT_SCHOOL_YEAR, but I didn't to match the current configuration option name. Is that ok?
Also, note the $CURRENT_TERMID is an ID, a number, NOT a textual value. Is that ok?
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
@regiscamimura, just one question - can we use these variables in command text?
@edgarf It can be used in the command text, but with some rules. From what we did for #273 , to use it in the command text, we need to:
- Display Name: StaffUSI
- Field Name: StaffUSI
- Type: system variable
- Values: [can be blank]
- Default: $StaffUSI
SELECT * FROM Staff WHERE Staff.StaffUSI = $filter.StaffUSI
Note the $filter.StaffUSI usage. We create a map between $filter.StaffUSI and the system variable $StaffUSI through the filter. Specially, the "Field Name". If we set "Field Name" to be "LoggedUser", we would need to do in the command text:
SELECT * FROM Staff WHERE Staff.StaffUSI = $filter.LoggedUser
We can improve things here a bit and avoid the need of a filter, so we could do something like
SELECT * FROM Staff WHERE Staff.StaffUSI = $StaffUSI
So system variables gets automatically replaced with the proper value, no need to map using the filters. Estimate for that is 3h.
@regiscamimura this way is good enough, thank you!
Create system variables for school year, StaffUSI, and term