# Retrieve Graphname

**URL:** <https://forum.cloverdx.com/t/retrieve-graphname/1707>\
**Category:** CloverDX Platform\
**Created:** [January 8, 2016, 12:00am UTC](https://forum.cloverdx.com/t/retrieve-graphname/1707 "2016-01-08T00:00:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![u02160](https://avatars.discourse-cdn.com/v4/letter/u/e99b99/32.png) [@u02160](https://forum.cloverdx.com/u/u02160)\
**Post date:** [January 8, 2016, 12:00am UTC](https://forum.cloverdx.com/t/retrieve-graphname/1707/1 "2016-01-08T00:00:00Z")

</div>

Good Day,

Is it possible to retrieve the graphname in a Transformation? For our application, we have audit fields to store which object created or last updated a row, and rather than hard coding a graph name that may or not be maintained, I would rather retrieve it from the system.

It appeared getGraph().getGraphProperties().getProperty(“JOB\_FILE”) had some promise, but in a transformation it returns a Function ‘getGraph’ is not declared error message.

Any guidance would be appreciated.

Thanks,  
Thomas

---

<div class="post-metadata">

**Author:** ![Lukas\_Cholasta](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.cloverdx.com/lukas_cholasta/32/166_2.png) [@Lukas\_Cholasta](https://forum.cloverdx.com/u/Lukas_Cholasta)\
**Post date:** [January 14, 2016, 9:51am UTC](https://forum.cloverdx.com/t/retrieve-graphname/1707/2 "2016-01-14T09:51:22Z")

</div>

Hi Thomas

The functions you mentioned are Java methods. If you want to get the graph name by a CTL2 function, please use this expression:

```auto
$out.0.field1 = "${JOB_FILE}"

```

That will return path with file name. In order to get only the file name you can use:

```auto
$out.0.field1 = getFileName("${JOB_FILE}")

```

Hope this helps.

---

<div class="post-metadata">

**Author:** ![u02160](https://avatars.discourse-cdn.com/v4/letter/u/e99b99/32.png) [@u02160](https://forum.cloverdx.com/u/u02160)\
**Post date:** [January 14, 2016, 6:49pm UTC](https://forum.cloverdx.com/t/retrieve-graphname/1707/3 "2016-01-14T18:49:32Z")

</div>

Thank you very much Lukas!

The Job\_File parameter worked fine. I received the same Function not declared on the getFileName, however, with a little lastIndexOf and substring, I was able to parse out the graphname from the path.

Should I concern myself with the Function not declared error at this time?

Thanks again,

---

<div class="post-metadata">

**Author:** ![Lukas\_Cholasta](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.cloverdx.com/lukas_cholasta/32/166_2.png) [@Lukas\_Cholasta](https://forum.cloverdx.com/u/Lukas_Cholasta)\
**Post date:** [January 18, 2016, 9:38am UTC](https://forum.cloverdx.com/t/retrieve-graphname/1707/4 "2016-01-18T09:38:53Z")

</div>

Hi Thomas

I believe, there is no need to be concerned about the missing function. I assume you are using Designer version 4.0.x or former. That function was added in version 4.1.0, thus it is not available in earlier versions. If you are using version 4.1.0 or higher, please let me know.

Best regards

---

<div class="post-metadata">

**Author:** ![u02160](https://avatars.discourse-cdn.com/v4/letter/u/e99b99/32.png) [@u02160](https://forum.cloverdx.com/u/u02160)\
**Post date:** [January 29, 2016, 10:34pm UTC](https://forum.cloverdx.com/t/retrieve-graphname/1707/5 "2016-01-29T22:34:21Z")

</div>

That is is. I am on 4.0…

Thank you very much!
