cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

containsLocation Function throws error

plaban
6-Contributor

containsLocation Function throws error

Hi,

I am getting  error while using containsLocation function.

Service with

2 inputs

CurrentLocation (Type: Location)

Geofence(Type: InfoTable, DataShape: GeoFenceBoundaryDataShape).


Script  of service

// location:LOCATION

var location = CurrentLocation;

// geoFence:INFOTABLE

var geoFence = Geofence;

// containsLocation(location:LOCATION,geoFence:INFOTABLE,locationField:STRING):NUMBER

var result = containsLocation(location, geoFence,"");

This script throws below error when I was testing it.

Error executing service

Wrapped java.lang.Exception: Unable To Convert From com.thingworx.dsl.engine.adapters.ThingworxInfoTableAdapter to INFOTABLE Cause: Unable To Convert From com.thingworx.dsl.engine.adapters.ThingworxInfoTableAdapter to INFOTABLE

GeoFenceBoundaryDataShape: Data shape having one Location type column.


Please help!

Thanks & Regards,

Plaban

1 REPLY 1
paic
12-Amethyst
(To:plaban)

Hi Plaban, the service is missing one more piece of information. The third parameter which you left blank, indicates the Name of the column in the geoFence table that contains the geo-coordinates.

Announcements


Top Tags