gitlabEdit

penProperty Management

Editing cards and calendars just got easier

VisualCard provides you with property management functions that allow editing cards, calendars, and their components, such as calendar alarms, events, journals, and to-dos.

circle-exclamation
chevron-rightValue info overviewhashtag

Any function that allows you to get value info of any string or integer property will return an instance of ValueInfo<string> or ValueInfo<double> that contains the following properties:

Property
Editable
Description

Arguments

An array of parsed ArgumentInfo instances

AltId

Alternative ID. If it's not specified, it returns -1.

ElementTypes

Card element type (home, work, ...)

Encoding

Property encoding

Type

Property type

ValueType

Value type (usually set by VALUE=)

Group

Property group

NestedGroups

Nested groups for a property (separated by a dot)

Value

A string or an integer value

IsPreferred

Is this part preferred?

where ArgumentInfo instances contain the following properties and functions:

Property
Description

Key

Argument key name

Values

An array of a tuple that describes the value case sensitivity and the unquoted value

AllValues

An array of unquoted values

You can also use the following functions:

Function
Description

Arguments.MatchValue()

A function that lets you match a value

HasType()

Checks to see if this value has a specific type

You can do the following operations on a property:

chevron-rightAdding a propertyhashtag

To add a property to a card and/or a calendar, you can use the following functions:

Function
Description

AddString()

Adds a string to either a card or a calendar

AddInteger()

Adds an integer to a calendar

AddPartToArray()

Adds a part to either a card or a calendar's part array

The functions all use the following arguments:

  • A property type that you want to add

  • A raw value that you want to parse (just the value portion of the property delimited by semicolons or commas (depending on a property))

  • A group that can be delimited by a dot, an extra prefix to add (only for non-standard properties)

  • An array of argument info for passing property parameters, such as TYPE, ALTID, and so on.

chevron-rightEditing a propertyhashtag

To edit a property in a card and/or a calendar, you can use any of the functions that allows you to get either a string info, an integer info, or an array info. After that, you can set values to the editable properties.

circle-exclamation
chevron-rightDeleting a propertyhashtag

To delete a property from a card and/or a calendar, you can use the following functions:

Function
Description

DeleteString()

Deletes a string from either a card or a calendar

DeleteInteger()

Deletes an integer from a calendar

DeletePartsArray()

Deletes a part from either a card or a calendar's part array

You'll have to specify the following arguments:

  • The property type (either enumeration or type parameter)

  • The index of a property that you want to remove.

For example, if you want to remove the third note property from a card, you'll have to specify both StringsEnum.Notes and 2 as parameters in the DeleteString() function.

chevron-rightFinding a non-standard propertyhashtag

To find a non-standard property (X-nonstandard and IANA properties) to a card and/or a calendar, you can use the following functions:

Function
Description

FindExtraPartsArray()

Finds non-standard properties of a specified part of property prefix

You'll have to specify the following arguments:

  • The property type (either enumeration or type parameter)

  • The part of property prefix.

For example, if you have a property called X-CHARACTERS, you can just provide CHAR, and VisualCard will perform a search.

Last updated