Every portal requires a relationship. What relationship have you set up?
In Manage | Database | Relationships, you can find a "box" matching the "show records from drop down" in layout setup for your reference layout and another "box" matching "show records from" in portal setup. We need to know exactly how those two boxes are connected in a relationship.
Sometime ago you looked at working with my DB. If I send you the files again and you have a look at the SWDM_SPECIES Layoout and then select the Disease Details tab it's within here that I would like this to show a drop down list.
In relationships you created a relationship which you have higlighted in green. These are the tables I refer to.
In the office at the moment and about to leave. Will send you the files again for your perusal. gone to your .live address
OK, but this could have been as simple as posting some text here like this:
LayoutTableOccurrenceName::Fieldname = PortalTableOccurrenceName::FieldName
Or possibly several such if there isn't a direct link between the two. Then others can follow and learn from this discussion.
You have this relationship:
SWDM_Deseases Setup::one = SWDM_Species::cOne
In the deseases table, only one record has a value in the field named "one". So only one record, (the last one in the table) could possibly appear in your portal. All the "one" field would need the value 1 before a portal to this table occurrence would list them.
You also have another problem: That last disease record has an ID number of 1, the same as the first record. Since the value in this field must be unique, it's value needs to be changed or you'll have problems anywhere you rely on this field storing a unique value.
Thanks for the reply. I have changed the ID to 24 which is the next increment and that should now be sorted.
I am a little lost in translation to the first section of your reply;
"In the deseases table, only one record has a value in the field named "one". So only one record, (the last one in the table) could possibly appear in your portal. All the "one" field would need the value 1 before a portal to this table occurrence would list them."
I would like to break this up alittle so I can understand more what you are saying. I apologise for sounding dumb, but I can't get my head around what your saying and need a more laymans type of reply.
"In the deseases table, only one record has a value in the field named "one".
I am not sure what you mean by this. In the field named one there is an entry as Nassle Bot Fly. As the table is already populated with the data I require I am not sure why you added this field.
"All the "one" field would need the value 1 before a portal to this table occurrence would list them."
Again, I am not sure what you mean by this.
Are you saying that SWDM_Deseases Setup::one Relationship needs to be a clone of SWDM_Deseases and then that is used as the portal "hook"?
I have managed to resolve this.
In releation ships I changed th = to X and that now lists ALL the records entries from the table.
I also do not want users to update these tables annd have them static.
I assume this is the correct way for this to be shown as I want.
As long as you do not need to add new records via the portal, the X operator would seem just what you need. You can use Behavior on the Inspector's Data tab to control whether users (all users) have access to the fields in the portal to prevent them from editing data in one of the fields. If you want to allow selective access to these fields, you can control access to the portal's table in manage | Security so that you, as a "full access" user can edit in the portal, but your everyday users would be prevented from doing so.
Thanks again. Happy with restricting all users.
Before I close this off I just have one small problem on the way the data is displayed.
In the three fields used, the text from Identification and Action fields overlap onto each other as they contain 7 to 8 lines of information each. How do I stop this?
I want it to look like this;
disease_name Identification Action
Anthrax Black Tar like look Notifiable desease
From mouth, anus, Nose etc Report to DEFRA
Seek medical advise
I have tried to use the scroll bar for each field, but that makes the appearance tatty.
"overlap into each other"? Having trouble picturing that.
If you have multiple lines of text, you have three options:
- Size all the fields and the portal row to be 7 to eight lines of text tall. (this is the simplest approach, but can leave a lot of blank space between portal rows.)
- Use the scroll bar that you don't want (You may try a compromise with a row height matching the average number of lines so that you only need the scroll bar for a few records.)
- Break up your data into multiple records so that each record stores only one line of text. (This takes a bit more work to set up and complicates the structure of your database. Don't use this method without a lot of forthought about how you need to use this table. I think this will work OK if: a) It's only a simple read-only reference table and b) you relate records to this table by an ID number (can't be a primary key now) instead of the disease name field (which would be blank for all but the first record in the group for one name.)
Ok, Will try options 1 & 2..Then comeback to you for option 3 if thats ok.
Or 4. Create a global popup window which allows full details to be read, have only limited text in the portal and a button to read full details if needed. Kind of like having the teaser text in a blog, you click READ MORE and then you are taken to the full post.
So if you click a details button it opens the popup window, populates it with the selected portal row record.