Variables and Functions in View Criteria
I am trying to be as forward-thinking with my application as possible. I know I won't be around to maintain it forever, so I thought that I could build a settings into a form: settings[string key, string value]
I created a few functions so that I could access the settings easily: settings.get(key_) and settings.set(key_, value_)
- string settings.get(string key_)
{
return settings[key = input.key_].value;
}
- void settings.set(string key_, string value_)
{
existing = settings [key == input.key_];
existing.value = input.value_;
}
The problem I'm running into is using these functions in View Criteria.
Currently, in all of my View Criteria, I have Semester == "Spring 2013". This is hard-coded and difficult to maintain. I would like to be able to change this using the application, rather than editing the application.
I tried to change it to Semester == settings.get("currentSemester") and the use of functions in this context is prohibited.
- show all rows from banner [Semester == settings.get("currentSemester")]
(
Semester
Status
W_Number as "W Number"
Last_Name as "Last Name"
First_Name as "First Name"
email as "Email Address"
Tags
notes as "Notes"
Financial_Aid_Type as "Financial Aid Type"
Limit
Added_Time as "Added Time"
Modified_User as "Last Modified User"
)
Is there a place I could create an application-wide setting like this so I don't have to change it so tediously in many locations?