ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Linked field not displaying properly #753

Open MerielP opened 8 years ago

MerielP commented 8 years ago

I've just made some changes to the structure of one copy of my clubs database - I added a couple of extra tables, and some new relationships.

When I try to add a new record to one of the new tables (membership_fees), something odd happens. The table has three linked fields, and two of these (club_id and evidence_id) behave as they ought to, with drop-down lists. The third, however (fee_type), just behaves like an integer field, and gives no obvious indication that it's actually a linked field.

However... there is one additional weird thing. If I go to the Add New Record form and click in the fee_type field, it sometimes (but not always) presents me with a list of the options I would have if that field were functioning as it should. It's not quite a drop-down list - it's more like a set of autocomplete suggestions. And of course if I select one, ORDS won't let me save the record, because the field is an integer field and the entries aren't integers. But this does suggest that ORDS has some kind of awareness that the field is supposed to be a linked one.

This is all happening in a project called 'Victorian Gentleman's Clubs', in a database called 'Clubs membership database'. Dave, I'll add you as a project member so you can see it for yourself.

MerielP commented 8 years ago

Mysteriously, this has now fixed itself. But I'm a bit wary of just resolving this issue, as it definitely wasn't working last week! Dave, do you want to have a look anyway and see if you can spot anything amiss?

scottbw commented 8 years ago

The auto-complete happens if there are more than 100 related rows for the relationship; its only a drop-down if there are more. And behind the scenes it should translate the displayed value to the integer key of the related field. Why it didn't work, and now does ... well there were some fixes to other issues that were part of the recent deployment after jenkins was set right.

MerielP commented 8 years ago

The auto-complete happens if there are more than 100 related rows for the relationship; its only a drop-down if there are more. And behind the scenes it should translate the displayed value to the integer key of the related field.

I don't think we're talking about the same thing here. I created a normal linked field, but it didn't display as one in the editing interface. What I saw was just a free text box, as if it were a standard integer field (which was how it was labelled). When I clicked the field to put the cursor in it, however, I sometimes got what looked like autocomplete suggestions - not the sort one gets in a properly functioning ORDS linked field, but more like what happens when you fill in an online form with information that you've provided before. But as I said, if I actually tried to select one of these options, I couldn't save the record, because as far as ORDS was concerned it was an integer field.

scottbw commented 8 years ago

Ah, no, definitely not that then.

It may have been fixed by something else I did around duplicate names?

thestoat commented 8 years ago

If this is still not an issue after 2 months, perhaps we can close it?

MerielP commented 8 years ago

To see whether this was still an issue, I went to one of the other versions of the clubs database that I have on Dev, and replicated the new tables and relationships that I previously created in the other version.

Unfortunately, it seems that the same thing happens! Some screenshots are below:

The database structure, with linked field highlighted: database structure showing linked field

The Add New Record form for the membership_fees table: that linked field is definitely not there: add new record form - missing linked field

So while it may have fixed itself previously, it looks as though there is still some underlying problem. This is in a project called 'Victorian Gentlemen's Clubs', in the database called 'Club membership database - expanded'. (Be wary - there two projects and several databases with not dissimilar names.) Dave, I'll add you as an admin.