Syntax

code

Function: GetPropertyFormula(ItemPath, PropertyName: String): String;

Description

Returns the formula string for the property specified by ItemPath and PropertyName.
Returns an empty string ('') if the item or property is not found.

Code Reference

  • 1. Navigate to Plugin Store->Tool Manager and create a new Plugin
  • 2. Set the plugin type to Script Code and open the Editor
  • 3. Copy Code into the editor
  • 4. press run

code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

procedure psgetPropertyFormula;

var

  ps: IPlanSwift;

  itm: IItem;

  propvalue: WideString;

begin

  //Create the Planswift Interfacev

  ps := coplanswift.Create;

  //Get the selected Item

  itm := ps.SelectedItem;

  //Set the property value

  propvalue := ps.GetPropertyFormula(itm.GUID,'Name');

  //Chece if Property value is empty

  if propvalue <> '' then

    ShowMessage(propvalue);

  //Free Planswift Interface

  ps := nil;

end;