procedure TForm1.psSetPropertyFormulaExample(Sender: TObject);
var
ps: IPlanSwift;
itm: IItem;
messg: string;
begin
ps := coPlanswift.Create;
//Begin Formula Update;
ps.BeginFormulaUpdate;
//Get The Current Selected Itm
itm := ps.SelectedItem;
//if no Item Selected then Exit function
if itm = nil then begin
showMessage('no Item Selected');
Exit;
end;
//Create a Description for the item
messg := Inputbox('Enter A Description','Please enter a description','Your Description Here');
//Set Item Description
itm.SetPropertyFormula('Description',messg);
//Make Description Property Visible
itm.GetProperty('Description').IsInput := True;
//Show Advance Item Properties
itm.Edit(true);
//End Update on formula
ps.EndFormulaUpdate;
//free Planswift Interface
ps := nil;
end; |