PLM 360 General Discussion

PLM 360 General Discussion

Reply
Active Contributor
xcollet
Posts: 29
Registered: ‎11-13-2006
Message 1 of 10 (294 Views)
Accepted Solution

Error using google map and pick list

294 Views, 9 Replies
04-25-2012 10:56 PM

Hi,

I have a workspace in which I defined an address section containing a "Country" field being a pick list.
I add to this workspace a Google map field (an exact copy of what is done in the suppliers workspace) I can save those settings but when I go to my Workspace, I get an error (see attached file).

 

Xavier

Xavier

Xavier,

 

I also do not experience this behavior in Chrome. By any chance you have a behavior script setup for this workspace as well?

Thanks!!!

The workaround is ok for now!

 

Employee
dvirh
Posts: 77
Registered: ‎04-27-2009
Message 2 of 10 (286 Views)

Re: Error using google map and pick list

04-26-2012 09:01 AM in reply to: xcollet

Hi Xavier,

 

That's a great question that requires digging a little into the technology to understand. The short answer is that you cannot use Computed Fields with Pick Lists as the value from the Pick List is only stored as a reference to another table in the DB and not as the text string that you expect.

 

That said, the field behaves exactly as you expect it to behave in Scripting. So an alternative solution to your problem will be to write an Action Script that will compute the result of the Google Maps mesh-in and will write it to the Map field. You can have this script run on Creation and/or Edit of the item to cover your particular use case.

Hagay Dvir
Product Manager
Product Lifecycle Management
Autodesk, Inc.
Product Support
piggeej
Posts: 281
Registered: ‎03-27-2012
Message 3 of 10 (282 Views)

Re: Error using google map and pick list

04-26-2012 09:51 AM in reply to: xcollet

Hi Xavier,

I have found this out as well, however as an alternative I found that I could use the non-pick list fields to feed the information in to the Google mapping script and leave out the pick list field.  This will eliminate the error that your seeing.

I have noticed for the most part Google will be able to accurately find the Country based on the zip code provided.

 



Joe Piggee
Support Specialist
Product Support
Autodesk, Inc.

Active Contributor
xcollet
Posts: 29
Registered: ‎11-13-2006
Message 4 of 10 (267 Views)

Re: Error using google map and pick list

04-27-2012 01:22 AM in reply to: piggeej

Hi,

 

I have made this script :

item.MAP = '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;q=' + item.RUE_ET_NO + ',' + item.VILLE + ',' + item.PAYS + ';t=h&amp;z=14&amp;output=embed"></iframe>'

 

I run it each time the record is saved... It works well except that I have to refresh (F5) the page after save...

 

Xavier

Xavier
Employee
dvirh
Posts: 77
Registered: ‎04-27-2009
Message 5 of 10 (260 Views)

Re: Error using google map and pick list

04-27-2012 07:50 AM in reply to: xcollet

Xavier,

 

That is an interesting behavior. I tried it on my system just to be sure and I don't experience the need to refresh the screen after edit. What browser are you using? I am using Chrome here.

 

Hagay.

Hagay Dvir
Product Manager
Product Lifecycle Management
Autodesk, Inc.
Active Contributor
xcollet
Posts: 29
Registered: ‎11-13-2006
Message 6 of 10 (255 Views)

Re: Error using google map and pick list

04-27-2012 08:49 AM in reply to: dvirh

I also use Chrome...

 

Google Chrome (18.0.1025.162m)

 

See attache video to see the exact behavior I have

Xavier
Product Support
piggeej
Posts: 281
Registered: ‎03-27-2012
Message 7 of 10 (248 Views)

Re: Error using google map and pick list

04-27-2012 09:04 AM in reply to: xcollet

Xavier,

 

I also do not experience this behavior in Chrome. By any chance you have a behavior script setup for this workspace as well?



Joe Piggee
Support Specialist
Product Support
Autodesk, Inc.

Employee
dvirh
Posts: 77
Registered: ‎04-27-2009
Message 8 of 10 (245 Views)

Re: Error using google map and pick list

04-27-2012 09:14 AM in reply to: xcollet

Xavier,

 

OK, the behavior is not consistent but I was able to reproduce it and will be reporting it as a bug. For now, F5 is the workaround...

 

Thanks for helping to find this bug!

 

Hagay.

Hagay Dvir
Product Manager
Product Lifecycle Management
Autodesk, Inc.
Active Contributor
xcollet
Posts: 29
Registered: ‎11-13-2006
Message 9 of 10 (235 Views)

Re: Error using google map and pick list

04-29-2012 11:32 PM in reply to: xcollet

Thanks!!!

The workaround is ok for now!

 

Xavier
Employee
dvirh
Posts: 77
Registered: ‎04-27-2009
Message 10 of 10 (222 Views)

Re: Error using google map and pick list

04-30-2012 02:15 PM in reply to: xcollet

Xavier,

 

Some additional information about this problem for the benefit of everybody on the forum. NOTE: all browser references below relate to the latest release of that browser.

 

We were able to pinpoint the issue to a knwon bug with webkit, which is the engine behnid Chrome and Safari. The problem does not reproduce on other browsers I've tested including IE, FireFox and Opera. In IE, you actually get a message on each and every view of a page that includes such content, to approve viewing the 'unsecured content'. If you approve it, the page refreshes and the problem does not appear. However, this means that IE gives you the worst user experience in this case.

 

We also came up with a workaround the the above problem that will be released in an upcoming release of PLM 360. I have already tested this fix in our QA environment and it seems to work great.

Hagay Dvir
Product Manager
Product Lifecycle Management
Autodesk, Inc.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post