# Graph name as Parameter in Designer

**URL:** <https://forum.cloverdx.com/t/graph-name-as-parameter-in-designer/2097>\
**Category:** CloverDX Platform\
**Created:** [September 10, 2020, 12:00am UTC](https://forum.cloverdx.com/t/graph-name-as-parameter-in-designer/2097 "2020-09-10T00:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pfield](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@pfield](https://forum.cloverdx.com/u/pfield)\
**Post date:** [September 10, 2020, 12:00am UTC](https://forum.cloverdx.com/t/graph-name-as-parameter-in-designer/2097/1 "2020-09-10T00:00:00Z")

</div>

Hi,

Is it possible to have the name of the graph that is currently executing available as a parameter available in CTL?

My use case is that I have many graphs running synchronously (via RunGraph) doing various data checks. If an issue is found the graph will write this to a log and I’d like to include (as part of that log) what graph picked up the error. Currently i’m hard coding the values in each graph but it’s cumbersome to maintain and would be great if I could just have the value dynamically populated.

I know this can be done when using the Server license but that’s not available to me so wondering if behavior can achieved in Designer.

Thanks,  
Paul

---

<div class="post-metadata">

**Author:** ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)\
**Post date:** [October 3, 2020, 6:35pm UTC](https://forum.cloverdx.com/t/graph-name-as-parameter-in-designer/2097/2 "2020-10-03T18:35:53Z")

</div>

Hi Paul,

As I understand it, you would like to use a graph name and write it to a field using CTL transformation. To do that, you might find the following code useful:

```auto
string GraphFile = getParamValue("GRAPH_FILE");
$out.0.field1 = GraphFile;

```

This piece of code will write graph file identification to the output in the following form:  
graph/graphname.grf  
The “graph” states for Graph directory in the project path. If you don’t want that extra part to be there, you might want to use some string functions such as **split**. Example:

```auto
string GraphFile = getParamValue("GRAPH_FILE");
string [] GraphName = split(GraphFile, "/");
$out.0.field1 = GraphName[1];

```

For more information about the function itself or other options, please see the documentation page [String Functions](https://doc.cloverdx.com/latest/designer/string-functions-ctl2.html).

Please let me know if this doesn’t answer your question or if any follow-up question arises. Thanks, Eva

---

<div class="post-metadata">

**Author:** ![pfield](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@pfield](https://forum.cloverdx.com/u/pfield)\
**Post date:** [October 8, 2020, 12:54pm UTC](https://forum.cloverdx.com/t/graph-name-as-parameter-in-designer/2097/3 "2020-10-08T12:54:25Z")

</div>

Thanks Eva!

That’s exactly what I needed. I did not see the GRAPH\_FILE parameter listed in workspace.prm - is there a place all the parameters available are documented?

Kind Regards,  
Paul

---

<div class="post-metadata">

**Author:** ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)\
**Post date:** [October 23, 2020, 12:24pm UTC](https://forum.cloverdx.com/t/graph-name-as-parameter-in-designer/2097/4 "2020-10-23T12:24:58Z")

</div>

Hi Paul,

The parameters available are indeed listed in the documentation ([https://doc.cloverdx.com/latest/server/graph-parameters.html](https://doc.cloverdx.com/latest/server/graph-parameters.html)). However, please don’t get confused that the link is from Server-related documentation. These parameters are used in the Designer runtime as well.

You might have also noticed, that the previously mentioned parameter GRAPH\_FILE is not listed on the above-mentioned page. Recently I have been informed that this parameter is about to be deprecated soon and we should be using JOB\_FILE parameter instead. Doing so in a graph (.grf design) will behave the same way as the GRAPH\_FILE parameter.

Thanks for understanding. Have a nice day, Eva
