April 1, 201510 yr Newbies Hello! *Please see attached file* I'm trying to create a field inspection sheet. Here's what I'm trying to achieve: -I want to create a portal that displays different elements to be inspected based on the project type. -I want the user to be able to comment on the inspected element. -The comments mentioned above should be different for each project The problem I'm facing is: -I am not sure how to create the comment field (yellow in the database) that would be related to the main record, not the one displayed in the portal. Is there a way to do this? I am also aware that I'm probably going to need a completely different approach. The reason I tried doing this with a portal is because I'm going to have a lot of elements to inspect and I'm going to program the portal to display filtered values based on another field. The attached file is to show you what I wan't to achieve. Thank you very much for your help! -FileJazz Portal_Comment.zip
April 1, 201510 yr If you look in your graph, you will notice that you have a fork on each end of the line. This indicates that you have a many-to-many relationship. You need to use a join between the two to resolve the issue. I've changed your graph to show how this is handled. Also note that every table should have a unique ID. You started to enter _pk... but you didn't make them auto-enter serial or UUID. I changed them to proper relational setup as well. Join tables are used similarly in the following configurations: Invoices -< InvoiceLines >- Products Surveys -< Answers >- Questions Note also that I changed your portal to this new join table, but the Element fields remain the same - only the comment belongs to the ProjectElements join table. Portal_CommentMOD.fmp12.zip
April 1, 201510 yr Author Newbies Thank you for the reply! It did help me with the formatting! I guess what I'm looking for is that Survey -< Answers >- Questions Where the Survey would be the Project Type, The Questions would be the Elements to Inspect And the Answers would be the Inspectors Comments/Notes. I will search for templates/examples of surveys! Thank you very much for your help!
April 1, 201510 yr Author Newbies Oh! Well in that case, how would I make it so that the "questions" shown in the portal are the same for each new inspection (survey)? Here's an example of what I would like to see in the portal for every new project (The ID and Question fields would be filled, but Comments would be blank when creating a new record) ID "Question" Comment (Answer) 1 Height of building 2.0m 2 Length of building Too long 3 Floor area OK 4 Beam size ... 5 ... 6 7 8 The questions would never change and would be shown in the portal, however the Comment will be a field that is filled in by the user every time. Is this possible within a portal? The reason I want to use a portal is so that I can filter the questions within the portal afterwards. Thank you! FJ
April 1, 201510 yr Ah yes. The first structure is what displays the questions asked (Elements) and the answers given (ProjectElements) for the Project. New file shows how to display ALL Elements for the Project where you can answer all questions for that Project. Layout is called Project Survey. Note that there is a script trigger on that layout OnRecordLoad. Its purpose is to set a global field in Elements with the Project ID as you move through Project records so the relationship to Answers uses both the ProjectID and the ElementID in the newly created ProjectElements (Answers) table occurrence. You can do away with the first relationship if you always wish to display all Elements for the Project. You can use portal filter to limit the Elements. Notice also that I have turned on 'Allow Creation of Related' to the Answers portal so typing an answer into the Comment field creates the new ProjectElements records. Portal_CommentMOD2.fmp12.zip
April 1, 201510 yr Author Newbies Wow this is exactly what I've been searching for! I'm going to be able to handle it from here! Thank you very much LaRetta!
Create an account or sign in to comment