Jump to content

API Component.Property.CopyValue: Difference between revisions

From Flowcode Help
JonnyW (talk | contribs)
XML Import to change Variable types into Variable Types
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
{| class="mtx-class-macrotable wikitable"
Copies a property value from one target to another
|-
 
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
<div style="width:25%; float:right" class="toc">
| width="90%" class="mtx-class-macrohead" | '''CopyValue'''
====Class hierarchy====
|-
[[API Component|Component]]
| colspan="2" | Copies a property value from one target to another&nbsp;
:[[API Component.Property|Property]]
|-
::[[API Component.Property|CopyValue]]
|-
</div>
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
__TOC__
| width="90%" | Source
 
|-
==Parameters==
| colspan="2" | The source component to copy from&nbsp;
[[Variable Types|HANDLE]] ''Source''
|-
:The source component to copy from
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 
| width="90%" | Dest
[[Variable Types|HANDLE]] ''Dest''
|-
:The target component to copy to
| colspan="2" | The target component to copy to&nbsp;
 
|-
[[Variable Types|STRING]] ''Property''
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
:The textual name of the property
| width="90%" | Property
 
|-
 
| colspan="2" | The textual name of the property&nbsp;
==Return value==
|-
[[Variable Types|STRING]]
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
The value copied to the ''Dest'' components ''Property''.
|}




Line 44: Line 44:
* Declare a variable 'result' of type STRING
* Declare a variable 'result' of type STRING
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Property.CopyValue(source, dest, "property")</pre>
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Property.CopyValue(source, dest, "property")</pre>
''<span style="color:red;">No additional information</span>''

Latest revision as of 14:11, 13 July 2026

CopyValue
Copies a property value from one target to another 
- HANDLE Source
The source component to copy from 
- HANDLE Dest
The target component to copy to 
- STRING Property
The textual name of the property 
- STRING Return


Detailed description

This copies a components property value named Property from the Source component to the Dest. It is provided for convenience.


An equivalent call using SetValue from this to a dest component may be:

::Component.Property.SetValue(dest, "property", this::property)


And from any component to another:

value = ::Component.Property.GetValue(source, "property")
::Component.Property.SetValue(dest, "property", value)


Examples

Calling in a calculation

  • Declare a variable 'result' of type STRING
  • Add to a calculation icon:
    result = ::Component.Property.CopyValue(source, dest, "property")