Syntax

code

Function:IItem.ParentItem: IItem;


Description

Returns the parent to the Item.


Code Reference


code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

var

  ps: IPlanSwift;

  itm: IItem;

  pitm: IItem;

begin

  // Create the Planswift Interface

  ps := coPlanswift.Create;

  // Get the Selected Item

  itm := ps.SelectedItem;

  // Get the Selected Items parent

  pitm := itm.ParentItem;

  // Show the parent items name

  ShowMessage('Select Item Parent is: ' + pitm.Name);

  // Free Planswift

  ps := nil;

end;