Please enable JavaScript to view this site.

Codolex

Navigation: Activities > Entity conversion

Key/value to entity

Scroll Prev Top Next More

The key/value to entity activity converts a TstringList or a string of key/value pairs to an entity.

uses System.Classes.TStringList

 

KeyValueToEntity

Activity properties

 

begin

 var TaskKeyValues: TStringList;

var StringList := TStringList.Create;

 StringList.AddPair('Description', Task.Description);

 StringList.AddPair('Done', Task.Done.Value.ToString);

 StringList.AddPair('DueDate', Task.DueDate);

 StringList.AddPair('Priority', Task.Priority);

 StringList.AddPair('TaskID', Task.TaskID.Value.ToString);

 TaskKeyValues := StringList;

end;

resulting code

 

Both an string and TStringList are valid options for the variable to convert.

© by GDK Software