Unfortunately, there is no CTL function to dynamically detect number of component ports.
However, it is possible to work around this by using a SimpleCopy component
. If you put this component behind your Reformat component, the code can be more generic and pass the output to only one record every time and the SimpleCopy will distribute it to as many edges as needed. In other words you'll detach the code from the actual graph design.
You can also send a record as a CTL function parameter. However, there is no keyword like record
,therefore, you need to use metadata name to declare a record datatype
as every record in CloverDX have to be described by metadata.
Both of the above is shown in the attached example project. Please try to import it into your Designer and review. Let me know if it helped you with your use case. If this is not what you're looking for, please get back to me with more details.