Thanks to Dean’s help, I have now correctly imported my Access data into jam.py, and am starting to grapple with forms. I have scoured the documentation, but I cannot find answers to the following:
1. Bands: the Application Builder allows me to create bands, but does not allow me to do anything with them – I cannot format them or move fields into them. How is this supposed to work?
2. How do I concatenate two fields for display? For example, if FirstName = “Peter” and LastName = “Smith”, how do I get the form to display “Peter Smith”?
3. How do I add a second or subsequent form to a table?
I would like to use as little code as possible, though I realise that at some point I may have to dive into the murky world of Java!
All help appreciated.
"Ahh, got it 👍 — so the ordering of soloists was baked into the schema.
That actually makes sense in music/concert databases: you often want to record not just who performed, but in which order/role they appeared (e.g., “first soloist = soprano, second soloist = tenor…”).
The mistake in MasterTable is storing that order by having separate columns (Solo1ID, Solo2ID …), which locks you to 6 and makes queries ugly."
...Thanks for spending time on this, Dean. By way of background, the data comes originally from Excel, and has been built up by an enthusiast over something like 50 years. It was full of inconsistencies, many of which I sorted out, but I decided that the date information was better left as free text – sometimes it is a full date, sometimes just a month, sometimes more than one date. I’m not sure what ChatGPT’s point about the 78, Tape etc field is; I think they are fine as simple free text. At some stage I was planning to add a free text search facility which would enable someone looking for, say, a particular record catalogue number to find it.
In Access I have a master query based on the master table which pulls in all the data from the other tables. That provides the data for the search form, which is then filtered to provide the data requested by the user, initially as a summary list, and then if required the full data for one record. That is what I was trying to replicate in jam.py. If there’s a better way to do it, I’m very happy to learn it.
Re the soloists, the order in which they appear is not particularly important, though there is a convention that higher voices and instruments come first (soprano-alto-tenor etc, or violin‑viola-cello etc) . I created six fields because that’s the highest number of soloists for any one piece in the database. I was aware that this was a bit clunky, but it works OK in Access. I have however hit a problem related to this in jam.py in trying to get the master table to include the voice_instrument field. (The data for voice/instrument is incomplete. I could add quite a bit to it from my own knowledge, but at this stage my aim is simply to get the existing data into a working online database.)
So yes, if you can show me a better way to handle the soloist fields, that would be appreciated.
One specific question: I asked a while back about concatenating FirstName and Surname. I copied the code from Nick Antonaccio’s Calculations video and amended it to concatenate firstname and surname in the conductor table. However it doesn’t work: the fullname field remains obstinately blank.
The code I came up with was this:
function calc(item) {
item.fullname.value = item.confirstname.value + " " + item.consurname.value;
}
function on_field_changed(field) {
var item = field.owner;
calc(item);
I copied it into condtable.js.
What have I done wrong?
This is a good example of something which is blindingly obvious to the expert but not to the newcomer. Yes, I have looked at the demos, and no, I didn’t deduce that I needed to double-click (not click) on any line to open the edit form. Indeed, I hadn’t realised that your changes applied to the edit form, since what I am trying to build at this stage is a read-only form. Is there a way to turn the edit form into a view form?
I installed version 7 so I don’t know why I’m still running v5 (how can you tell, by the way?).