# PropertyFunction QueryTerm name

**URL:** <https://community.stardog.com/t/propertyfunction-queryterm-name/394>\
**Category:** Support\
**Created:** [June 11, 2017, 11:36pm UTC](https://community.stardog.com/t/propertyfunction-queryterm-name/394 "2017-06-11T23:36:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [June 11, 2017, 11:36pm UTC](https://community.stardog.com/t/propertyfunction-queryterm-name/394/1 "2017-06-11T23:36:33Z")

</div>

Is there any way to get the QueryTerm name from within a PropertyFunction? I’m specifically referring to the string name not the integer.

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [June 12, 2017, 11:37am UTC](https://community.stardog.com/t/propertyfunction-queryterm-name/394/2 "2017-06-12T11:37:32Z")

</div>

If your PropertyFunction extends AbstractOperator, you can access the MappingDictionary via getMappings(), and get the Value from there.

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [June 12, 2017, 1:36pm UTC](https://community.stardog.com/t/propertyfunction-queryterm-name/394/3 "2017-06-12T13:36:06Z")

</div>

Will that return the name of the variable? If I had a property function `?result :myPropertyFunction ?input`. I can get the integer that represents ?input but I’m trying to get the string “input”. What I’m trying to do is use the inputs as a dictionary of name/values rather than a list of int/values.

Now that I’m thinking it through, what I’m trying to do is probably not the best idea. I think “don’t do that” might be the answer to “how do I do this?” Oh well, it’s really just a learning exercise so it’s been successful on that level you just have to suffer through my stupid questions.

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [June 26, 2017, 1:36pm UTC](https://community.stardog.com/t/propertyfunction-queryterm-name/394/4 "2017-06-26T13:36:07Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
