Add Languages and school classes lookups
Issue #91
closed
These two lookups needed for school form
Comments (7)
-
reporter -
reporter I think this can go into issue83 branch with the final tidy-ups of school editing.
-
reporter Note on the screen image above: the lookups method do not require authorization (they care called before signin) so you don't need a bearer Token authorization header to test this call.
-
Sure I will include this issue in. It's taking me a little longer but I will get to this first thing after lunch.
-
- changed status to closed
-
-
reporter - Log in to comment
This is controlled in Pineapples.Data, DSLookups
DSLookups maintains a dictionary of lookup names and the SQL Statements that retrieve them. These SQL statements are designed to return the lookup code as C, the lookup description ( or name) as N.
Add two new entries to this array, called languages and schoolClasses
Construct the sql for each to read from the views TRLanguage and TRSchoolClass (The data is in the tables lkpLanguage and lkpSchoolClass, the corresponding TRx views just choose the description from up to 3 languages - codeDescription codeDescriptionL1 codeDescriptionL2 - on the table. )
Add the new entries 'languages' and 'schoolClasses' to the array in the method
core()
. This defines all the lookup tables fetched on application startup.Build the project, and the Pineapples project!
To test if it has worked, you can use fiddler composer to GET api/lookups/collection/core: