# Trying to index a Calculated field

**URL:** <https://clarionhub.com/t/trying-to-index-a-calculated-field/8163>\
**Category:** questions\
**Tags:** dictionary\
**Created:** [May 15, 2025, 9:11am UTC](https://clarionhub.com/t/trying-to-index-a-calculated-field/8163 "2025-05-15T09:11:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tonymarshall](https://clarionhub.com/user_avatar/clarionhub.com/tonymarshall/32/3786_2.png) [@Tonymarshall](https://clarionhub.com/u/Tonymarshall)\
**Post date:** [May 15, 2025, 9:11am UTC](https://clarionhub.com/t/trying-to-index-a-calculated-field/8163/1 "2025-05-15T09:11:12Z")

</div>

Hi  
I am trying to index a calculated field but to no success.  
To be exact. I am returning a Day [Day(log:DOB] from a (DOB) 'Date of birth' field..  
How can I create an index using this "day" field?

Thanking You in advance

---

<div class="post-metadata">

**Author:** ![JonW](https://clarionhub.com/user_avatar/clarionhub.com/jonw/32/1344_2.png) [@JonW](https://clarionhub.com/u/JonW)\
**Post date:** [May 15, 2025, 12:48pm UTC](https://clarionhub.com/t/trying-to-index-a-calculated-field/8163/2 "2025-05-15T12:48:51Z")

</div>

Is this a Clarion question or a database question? And if it is a database question, which database?

---

<div class="post-metadata">

**Author:** ![vitesse](https://clarionhub.com/user_avatar/clarionhub.com/vitesse/32/837_2.png) [@vitesse](https://clarionhub.com/u/vitesse)\
**Post date:** [May 16, 2025, 2:01am UTC](https://clarionhub.com/t/trying-to-index-a-calculated-field/8163/3 "2025-05-16T02:01:09Z")

</div>

if I am understanding you properly you will have a Day field in your table and a trigger in the dct on add and change to calculate it “Day(log:DOB)”

then just have your key on the day field.

If you are using a database, as Jon asks, presumably it would be different and you wouldn’t need the client-side trigger.

cheers

Geoff R
