Mobile Data StudioObject Model › Point

The Point class represents one point on a Page of a Project.

This can be obtained via the Page.Points property, which returns a PointCollection.

Properties

Application

Returns the root Application.

AsXML

Returns an XML description of the point, as a String.

Bold

A Boolean that indicates whether the point caption is shown in bold. Read/write.

Caption

A String that is the point caption. Read/write.

Default

A String that is the default value of the point when new sessions are created. Read/write.

Help

A String that is displayed if the user taps on the point caption. May include limited HTML markup. Read/write.

Name

A String that is the point ID name of this point. Read/write.

Point ID names are unique across the project, however not all points need have an ID name.

Page

Returns the Page this Point belongs to.

Project

Returns the Project this Point belongs to.

Required

A Boolean that indicates whether the point must be filled in before leaving the page.Read/write.

Results

A Boolean that indicates whether the point value is saved to the session, or is discarded when the session is finished. Read/write.

TypeCode

Returns an Integer that is the type of point. Note that custom points all have the same TypeCode.

TypeName

Returns a String that is the type of point. Note that custom points all have the same TypeName.

Unique

Returns an Integer that uniquely identifies this point within the project.

No two points have the same identifier, and the identifer is preserved when moving the point.

Value

A String that is the current value of the point, if a session is open on the server (see Project.CurrentSession). Read/write.

See also the VariantValue property.

VariantValue

A Variant that is the current value of the point, if a session is open on the server (see Project.CurrentSession). Read/write.

Unlike the related Value property, this property can accept other data types than String.

Visible

A Boolean that indicates whether the point is visible on the page. Read/write.

Methods

GetOutputString

Takes a Variant value created by this point, and produces a String value suitable for output to other media, possibly by creating an associated file on disk containing any attached image or other data.

Takes three parameters:

  • value - a Variant which contains the value for this point.
  • basename - a String which contains the base filename for this output operation (for example: the filename of the HTML file), including directory.
  • index - an Integer which should be different for each invocation of this method during the same output operation.

Returns a String that can be used in the session output:

  • If value was a Boolean, Integer, String or date to begin with, returns a String form of that.
  • If value was a sketch, saves the sketch image to a file using basename and index, and returns the filename.
  • If value was an embedded file such as a photo or video, saves it to disk using basename and index, and returns the filename.

SaveSketchImage

Only applicable if this is a Sketch point. Decodes the sketch image and saves it as an image file.

Takes two parameters:

  • value - a Variant which contains the sketch to save. It should have been generated by this point's Value property, either directly or via a Session.
  • filename - a String that specifies the filename to save as.

SaveSketchImageEx

Only applicable if this is a Sketch point. Decodes the sketch image and saves it as an image file.

Similar to SaveSketchImage, but accepts two parameters:

  • session - a Session from which to load the sketch data, using the point's Name property.
  • filename - a String that specifies the filename to save as.

The advantage of this method is that if the Sketch point is configured to sketch onto an image coming from another point, such as a Camera point, that image can also be fetched from the Session.