3459 Posts in 1064 Topics by 739 members
|Go to End|
13 June 2014 at 10:08pm
I am a little stuck at the moment, I have a function (this works ok) that looks like this.
$a = 1
$b = 2
$c = $a+$b;
my question is how can i get the result and write it to a field in another dataobject?
any help or ideas would be appereciated thank you
28 June 2014 at 8:06pm
How you get the result of that depends on where that function is and where you want to write the dataobject?
To update a dataobject it's a simple task of getting the object, setting the property and calling write()
$obj = Page::get()->first();
$obj->Title = "Test";
|Go to Top|