The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VBScript Calculated Value - Retrieve properties of related Object

I've been using the VBScript Calculated Value a bit retrieving values of properties on an object

For example on an Invoice object, (commented out) retrieving the value of an Invoice # property searching by alias, and (not commented out) searching for a Line Item property value by ID

Dim szDisplayPropertyValue
Dim szOutString



'szDisplayPropertyValue = PropertyValues.SearchForPropertyByAlias( Vault,"PD.InvoiceNumber",False).Value
'szOutstring = " Invoice # " + DisplayPropertyValue

szDisplayPropertyValue = PropertyValues.SearchForProperty(1049).TypedValue.DisplayValue
szOutstring = " LineItemName " + szDisplayPropertyValue


Output = szOutString

In the second example the property is actually the display name of an object that is on the metadata card as a value list of Line Item objects.

How do I retrieve a property of that object? For example if that Line Item object has a property of Line Item Total (alias PD.LineItemTotal)

In general I'm interested in how to retrieve the properties of related objects, whether related via object value list like this example, or maybe the properties of an Owner object.

Thanks