Advanced Reference Qualifier Based-On Current Variable

codechaser
Giga Expert

Need help setting-up an advanced reference qualifier that uses the 'u_term_code' field from the *Term drop-down as a dependency and returns a list of courses that share the value.

javascript: u_term_code = current.variables.u_term_code;

Above, is the code I currently have.

Grade_Change_Form.png

47 REPLIES 47

If you go to the course list and search for term = spring 2017 do you get any records?   If not then you need to make sure our change to a reference didn't affect those.


Hi Michael!   I wanted to bring you up to speed on the Advanced reference qualifier issue.   I basically started over with both tables, making the '"term_code" field on the Courses table a Reference and pointing it to the "BSU - Terms" table.   Still, I can't get anything to display, using "javascript: 'u_term_code = '+current.variables.term_req;" as an Advanced Reference qual under the Courses variable on the form.



Thoughts?


Jason, I am not sure what else to suggest.   I just created a few tables in my demo instance to mimic your setup and it worked.



Term table with a name:


find_real_file.png



Course table with a name and a reference field (u_term) to the Term table:


find_real_file.png



I created two test course records:


find_real_file.png



I created a catalog item with two variables.   One is a lookup select box where it will display all the terms.   This could have been a reference instead too.


find_real_file.png



Then a reference variable for the course with a advanced reference qualifier limiting the selection based on the Term variable:


find_real_file.png



When I select Fall 2017 only Math shows up:


find_real_file.png



When I choose Spring 2017, only AFAM shows up:


find_real_file.png


GOT IT!   I changed the quotes on the Advanced reference qualifier to singles and removed the semi-colon at the end.   THANK YOU, Michael and everyone for all the help!


Hi Michael!



Piggy-backing this question.   Let's say we want to continue this method to return Section number for the course and term selected.   The section number is a nested field on the Courses table.   Since this is not a reference pointed back at the Term table, will this same method work for returning all sections of a course selected, based-on term?



I hope this makes sense.



All the Best!