Have you ever run into this?
Aspen doesn’t show you a table when editing a field set, but you know it should be available.
For example, you’d like to put contact info for a student on the Daily Office attendance screen, to make it as easy as possible for someone in the office to call a parent.
The problem, of course, is that when you go to edit the Default Fields on this screen, you don’t have the option to choose fields from Contact 1, 2 or 3. You just have Student!
Is there, then, a way to add a field from a table that is missing in the field set editor?
Why, yes there is!
To do this, you’ll want to have 2 different browsers open (or at least a new window in private / incognito mode) so you can edit the field set in one browser while looking at the Data Dictionary in another.
|1.||First, copy the navkey for this screen from your browser’s address bar. For our example, it is:
If you ever don’t see the navkey, just click on the top-tab or side-tab where you currently are, and Aspen will redraw the screen and show the navkey.
|2.||Next, you may want to name your field set something crazy so you can more easily find it in the next step.
AAA Default Fields is my favorite.
|3.||In the District view, go to the Global tab > All > Field Set, and view all the records.
By default, the records are sorted by name, so your AAA Default Fields record should be right at the top.
Just to be sure, check the navkey as well.
Click on your field set record to see / edit the details.
|4.||Alas, I’ve brought you to this screen only to have to go somewhere else. Drag!
We need a custom template to add our new fields, so we’ll create that now. In the future, however, you can skip this entire step (#4).
Go to Tools > Templates, and add two new templates. I’ve created Google docs with the details for each, so just click on the links below:
I’ve also put these two templates in the Aspen Inside Out wiki.
With these two templates now created, click back to Global, and Aspen should show your new template!
|5.||In case you’ve been bored up to now, here’s where it starts to get interesting.
We have an “Add” button. That’s promising.
When we click Add, the popup template asks for three things:
Let’s start with finding the Related object identifier.
There are two fields we want to add:
The Name field for a contact is on the Contact table, and the Cell phone field is on the Person table.
We can easily go to our data dictionary and find the object OID for each of these fields:
But what about the value for the “Relation”?
|6.||Finding the relationship path between two tables can be tricky. I’ve recorded a video below to walk you through how I do it, but our example gives us a hint since there are already two fields that are on a related table (Student).
The Relationship Path from Attendance to Contact
(click the bottom-right corner to maximize the video so the
The “base” table for the Daily Office screen is Attendance. The Student table is directly related to the Attendance table, and the relationship is relAttStdOid.
As shown in the video, we now want the relationship to Contact 1, which is relStdCtjOid1. This is the Student-Contact table (or Contact Join, thus the “Ctj“).
For our first field, Name, we have to go to the Contact table, so we need one more relationship: relCtjCntOid.
Putting it all together, to add the Name field for Contact 1 to the Daily Office field set, we click the Add button and enter this:
Notice for Field relation, there is a period between relationships, but not at the start or at the end:
Finally, you can use any Sequence number you want, but I usually add my fields to the end, and then adjust their position with the Field Set editor once I’m all done in this Global template.
Going on from Contact to Person
To finish this step, we now want to add the Cell phone field, which is on the Person table.
Thankfully, we’ve already found the relationship path that goes all the way from the Attendance table to the Contact table, so we only need one more segment–the relationship from Contact to Person, which our Data Dictionary tells us is relCntPsnOid. That means the full relationship path from Attendance all the way to Person (via the student’s 1st contact) is:
Click Add again on our template, and enter this:
Replace psnPhone03 with whatever field on the Person table you desire.
|7.||Whew! You made it through step 6!
This is what your screen should now look like:
Save it, and return to the School view > Attendance.
|8.||You should now see your new fields there before you, but with a flaw.
The “Student” prefix makes the columns wider than they need to be, and is entirely unnecessary.
Thankfully, the flexibility of the Data Dictionary saves us again!
Go back to District > Admin > Data Dictionary, and find the Student Attendance table. Select it and click on the Relationships side-link.
Click on the Student relationship, and uncheck the box for “Show prefix”.
Reload the Data Dictionary and go back to your Daily Office screen.
If you don’t see the prefix removed right away, don’t worry, it will as soon as you complete Step 9.
|9.||For the very last and final step (you thought it would never come, right?!?), open your Manage Field Sets screen and edit “AAA Default Fields”.
You should see your two new fields, which you can now re-arrange as you would like, just don’t remove them (unless you want to practice steps 5-7 again).
Don’t forget to change the name of your field set back to just “Default Fields“.
Well, you’ve just completed quite an adventure!
With nine steps, eleven screenshots, one video, and just over 1000 words, it’s not the easiest Aspen tip you’ll ever read, but I hope you’ve found it to be worth your time.