B.Gordon Posted March 14, 2005 Author Posted March 14, 2005 I have a portal with a list view. I have a second portal next to it in which I would like to display more details about the selected line in the first portal. Any idea how I would do this? It would need to show only the related info from the currently selected row in the first portal and update as the rows are clicked. Thanks.
B.Gordon Posted March 14, 2005 Posted March 14, 2005 I have a portal with a list view. I have a second portal next to it in which I would like to display more details about the selected line in the first portal. Any idea how I would do this? It would need to show only the related info from the currently selected row in the first portal and update as the rows are clicked. Thanks.
B.Gordon Posted March 14, 2005 Author Posted March 14, 2005 I have a portal with a list view. I have a second portal next to it in which I would like to display more details about the selected line in the first portal. Any idea how I would do this? It would need to show only the related info from the currently selected row in the first portal and update as the rows are clicked. Thanks.
PeterHW Posted March 14, 2005 Posted March 14, 2005 Hi Bill, there are several ways of doing this. I assume the data you are viewing through the portal are related records from another table ? Or are they records from the same table, related through a selfjoin ? I'll assume the first. For the purpose of this example, we'll call the table holding the portals "Main" and the table holding the records "Details". Make another field in "Main", global, text, e.g. "gText". Create a second relationship from "Main" to "Details", based on gText and a unique foreign key in the other table I assume you have set up already. For this example, I'll assume this field is called "ID". Now, create a script "ViewDetails", which has one line : Set Field [Main::gText,Details::ID] Now, in your first (list) portal, select one or more fields in layout mode, right-click and select "Specify Button". Select "Perform Script" and choose the script you have just created. Now, create your second, detail portal. Make sure it only contains one row and is based on the second relationship you have just created. Place the fields you want to view inside the portal and make sure these are based on the same relationship as the details portal. Now, if you click on a row in the left portal, gText will be set to that record's foreign key (ID). Using the second relationship, the details portal will show the data of that particular record. HTH, Peter
PeterHW Posted March 14, 2005 Posted March 14, 2005 Hi Bill, there are several ways of doing this. I assume the data you are viewing through the portal are related records from another table ? Or are they records from the same table, related through a selfjoin ? I'll assume the first. For the purpose of this example, we'll call the table holding the portals "Main" and the table holding the records "Details". Make another field in "Main", global, text, e.g. "gText". Create a second relationship from "Main" to "Details", based on gText and a unique foreign key in the other table I assume you have set up already. For this example, I'll assume this field is called "ID". Now, create a script "ViewDetails", which has one line : Set Field [Main::gText,Details::ID] Now, in your first (list) portal, select one or more fields in layout mode, right-click and select "Specify Button". Select "Perform Script" and choose the script you have just created. Now, create your second, detail portal. Make sure it only contains one row and is based on the second relationship you have just created. Place the fields you want to view inside the portal and make sure these are based on the same relationship as the details portal. Now, if you click on a row in the left portal, gText will be set to that record's foreign key (ID). Using the second relationship, the details portal will show the data of that particular record. HTH, Peter
PeterHW Posted March 14, 2005 Posted March 14, 2005 Hi Bill, there are several ways of doing this. I assume the data you are viewing through the portal are related records from another table ? Or are they records from the same table, related through a selfjoin ? I'll assume the first. For the purpose of this example, we'll call the table holding the portals "Main" and the table holding the records "Details". Make another field in "Main", global, text, e.g. "gText". Create a second relationship from "Main" to "Details", based on gText and a unique foreign key in the other table I assume you have set up already. For this example, I'll assume this field is called "ID". Now, create a script "ViewDetails", which has one line : Set Field [Main::gText,Details::ID] Now, in your first (list) portal, select one or more fields in layout mode, right-click and select "Specify Button". Select "Perform Script" and choose the script you have just created. Now, create your second, detail portal. Make sure it only contains one row and is based on the second relationship you have just created. Place the fields you want to view inside the portal and make sure these are based on the same relationship as the details portal. Now, if you click on a row in the left portal, gText will be set to that record's foreign key (ID). Using the second relationship, the details portal will show the data of that particular record. HTH, Peter
-Queue- Posted March 14, 2005 Posted March 14, 2005 Your second relationship should be from a global in the current table to the serial in the table you want to display more data. You don't need a second portal, just put the related fields on the layout. Make the portal's row a button to Set Field [global; PortalsRelationship::serial]. This will set the global with the related row's serial and should cause the additional related field to update. You may need a Commit Records/Requests step after the Set Field.
-Queue- Posted March 14, 2005 Posted March 14, 2005 Your second relationship should be from a global in the current table to the serial in the table you want to display more data. You don't need a second portal, just put the related fields on the layout. Make the portal's row a button to Set Field [global; PortalsRelationship::serial]. This will set the global with the related row's serial and should cause the additional related field to update. You may need a Commit Records/Requests step after the Set Field.
-Queue- Posted March 14, 2005 Posted March 14, 2005 Your second relationship should be from a global in the current table to the serial in the table you want to display more data. You don't need a second portal, just put the related fields on the layout. Make the portal's row a button to Set Field [global; PortalsRelationship::serial]. This will set the global with the related row's serial and should cause the additional related field to update. You may need a Commit Records/Requests step after the Set Field.
B.Gordon Posted March 18, 2005 Author Posted March 18, 2005 Your suggestion makes sense but I am not implementing properly. I may not have explained the issue properly either. I have Table B that has an ID field and data about a specific car (which relates back to a department that has many cars). I have Table C that has a record of who signed cars in and out on a daily basis. Each new record in Table C is given a unique RecID and also contains the Table B:ID relation so activities are tracked by the vehicle in question. Table B:ID is the relation to Table C:ID I have a layout that contains info about the department. Table B portal shows the lists of cars (each on their own line) that are related to Table A (the dept). Table C is a portal to the right of Table B and is supposed to show ONLY the in/out activities for the car I select on the Table B portal. Right now, it shows ALL activity for ALL the cars in Table B. I hope this helps you help me. There are no globals and the only relation between Table B and Table C is the common ID field. This seems to limit the scope of table C to only the cars associated to the dept I am viewing (which is correct) but I could not make the SetField from TableC:ID;TableB:ID filter the results in Table C. It did not seem to make any difference at all when called from a button I placed on the portal showing Table B. Hope I did not make this too complicated.
B.Gordon Posted March 18, 2005 Author Posted March 18, 2005 Your suggestion makes sense but I am not implementing properly. I may not have explained the issue properly either. I have Table B that has an ID field and data about a specific car (which relates back to a department that has many cars). I have Table C that has a record of who signed cars in and out on a daily basis. Each new record in Table C is given a unique RecID and also contains the Table B:ID relation so activities are tracked by the vehicle in question. Table B:ID is the relation to Table C:ID I have a layout that contains info about the department. Table B portal shows the lists of cars (each on their own line) that are related to Table A (the dept). Table C is a portal to the right of Table B and is supposed to show ONLY the in/out activities for the car I select on the Table B portal. Right now, it shows ALL activity for ALL the cars in Table B. I hope this helps you help me. There are no globals and the only relation between Table B and Table C is the common ID field. This seems to limit the scope of table C to only the cars associated to the dept I am viewing (which is correct) but I could not make the SetField from TableC:ID;TableB:ID filter the results in Table C. It did not seem to make any difference at all when called from a button I placed on the portal showing Table B. Hope I did not make this too complicated.
B.Gordon Posted March 18, 2005 Author Posted March 18, 2005 Your suggestion makes sense but I am not implementing properly. I may not have explained the issue properly either. I have Table B that has an ID field and data about a specific car (which relates back to a department that has many cars). I have Table C that has a record of who signed cars in and out on a daily basis. Each new record in Table C is given a unique RecID and also contains the Table B:ID relation so activities are tracked by the vehicle in question. Table B:ID is the relation to Table C:ID I have a layout that contains info about the department. Table B portal shows the lists of cars (each on their own line) that are related to Table A (the dept). Table C is a portal to the right of Table B and is supposed to show ONLY the in/out activities for the car I select on the Table B portal. Right now, it shows ALL activity for ALL the cars in Table B. I hope this helps you help me. There are no globals and the only relation between Table B and Table C is the common ID field. This seems to limit the scope of table C to only the cars associated to the dept I am viewing (which is correct) but I could not make the SetField from TableC:ID;TableB:ID filter the results in Table C. It did not seem to make any difference at all when called from a button I placed on the portal showing Table B. Hope I did not make this too complicated.
B.Gordon Posted March 18, 2005 Author Posted March 18, 2005 Thanks all... it makes sense now... I figured it out just after posting my followup. Thanks!!! Bill
B.Gordon Posted March 18, 2005 Author Posted March 18, 2005 Thanks all... it makes sense now... I figured it out just after posting my followup. Thanks!!! Bill
B.Gordon Posted March 18, 2005 Author Posted March 18, 2005 Thanks all... it makes sense now... I figured it out just after posting my followup. Thanks!!! Bill
Recommended Posts
This topic is 7190 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now