Newbies MartinT Posted September 11, 2009 Newbies Posted September 11, 2009 (edited) Hi guys, New to this forum and this is probably a simple question to get answered but here goes: I have a portal with 2 rows and on each row I have a 'Google Maps' button. What I would like that button to do is grab the data from the 'P/Code' field and then goto the Web viewer layout to display the Postcode data on Google Maps Now the way I have it at the moment works fine for the 1st row only, I cannot for the life of me get it to grab the 'P/Code data' from row 2 or 3...4...5 etc I have tried quite a few scripts and calculations but must admit get lost in the math Image of portal rows: thanks, cheers, Martin Edited September 11, 2009 by Guest
mr_vodka Posted September 11, 2009 Posted September 11, 2009 your webviewer layout should be based off the same base table as the portal records. Then you can use Go to Related Records to go to that specific record in the portal using the web viewer layout. The button that calls the script step should be on the portal row.
Newbies MartinT Posted September 11, 2009 Author Newbies Posted September 11, 2009 Ok thanks, Then you can use Go to Related Records to go to that specific record in the portal using the web viewer layoutDidn't quite understand that bit ... sense wise ... The customer's data is in one portal, on one layout and the WebViewer is on another layout ... do I put the webviewer into another portal? ... The real question, I suppose, is: what script do I use to pull out the 'P/Code' information on ANY portal row I choose (by clicking the appropriate 'Google Map' button) ... then that data (from that portal row) is used to view in the webviewer ... which would be Google maps ... As I say the 1st row 'P/Code' data displays fine in the webviewer ... but ONLY the 1st row ... if I click the 'Google Button' in the second row it still shows the info from the 1st ... The button is already in the portal row/s, as seen in the image ... cheers, Martin
Newbies MartinT Posted September 12, 2009 Author Newbies Posted September 12, 2009 Well the one that works for just the first row isn't really that involved ... The script step just goes to the specific layout i.e. Goto layout 'Customers Google Map' ... Hence why I am asking if any one knows a script to do what I described in the previous thread ... All the info is in the image ... Field: P/Code = postcode data from portal row ... to use in webviewer Button: Google Map = button in portal row to run the script Layout: Customer Google Map = the layout to goto and display postcode data in the webviewer Cheers, Martin
comment Posted September 12, 2009 Posted September 12, 2009 (edited) It would help if you posted your script. Knowing which layouts are involved and which tables they belong to would also be useful. Edited September 12, 2009 by Guest
Newbies MartinT Posted September 12, 2009 Author Newbies Posted September 12, 2009 (edited) Hi Comment, Ok sorry ... here you are ... the step script that works for 1st row only: Go to Layout["Website - Google Maps - Customer" (Tech Base-Pro)] I thought that the different 'Google Map' buttons would transfer the appropriate P/Code data, from the portal rows, over to the webviewer, being as they are on different portal rows ... which seemed obvious ... This script is assigned to the 'Google Map' button ... via the Perform Script action The main database table is called Tech Base Pro MAIN The customer details table is called Tech Base Pro CUSTOMERS The customer details table (showing customer details) is in a portal (as in the image above), and on a layout in the Tech Base Pro MAIN table ... this table is the main one used for viewing all other details of the database ... it's only the customers details that needs (has) a portal ... The webviewer is also on a layout in the Tech Base Pro MAIN table ... The CustRecord# (in the image) is also the portal row# ... that's not in the customers table as I'm just using '@@' to get that number ... cheers, Martin Edited September 13, 2009 by Guest
comment Posted September 13, 2009 Posted September 13, 2009 Go to Layout["Website - Google Maps - Customer" (Tech Base-Pro)] If that's the entire script, then the problem is with the way the web viewer is set up. I am guessing(!) that the web viewer references the field Postcode from the Customers table - and since the web viewer is on a layout of the Main table, the reference always evaluates using data from the FIRST related record in Customers. One way to solve this would be to place the web viewer on a layout of Customers, and change the button action to Go to Related Record [ from table: Customers ; Using layout: ].
Newbies MartinT Posted September 13, 2009 Author Newbies Posted September 13, 2009 Well thank you Comment ... that works a treat now ... I think that's what Vodka was trying to explain but I didn't understand the main sentence ... so thank you both ... I can't believe it was that simple ... SUMMARY: That's where I was going wrong ... I DID try using the 'Goto Related records' scripts over and over but couldn't get anywhere because I wasn't able to get to a related layout for the Tech Base Pro CUSTOMERS ... because I didn't have one ... so by simply changing the Webviewer 'layout' page to show records from the Tech Base Pro CUSTOMERS table done the trick ... as well as using the 'Goto Related Rocord' script ... obviously ... Cheers, Martin
Recommended Posts
This topic is 5550 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