# urtext and (proposed) orig\_comment / orig\_value

**URL:** <https://forum.beeminder.com/t/urtext-and-proposed-orig-comment-orig-value/10337>\
**Category:** Tech\
**Created:** [May 9, 2022, 9:09am UTC](https://forum.beeminder.com/t/urtext-and-proposed-orig-comment-orig-value/10337 "2022-05-09T09:09:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ianminds](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/ianminds/32/4188_2.png) [@ianminds](https://forum.beeminder.com/u/ianminds)\
**Post date:** [May 9, 2022, 9:09am UTC](https://forum.beeminder.com/t/urtext-and-proposed-orig-comment-orig-value/10337/1 "2022-05-09T09:09:01Z")

</div>

One question and one RFE.

I was wondering about the `urtext` field on datapoints. Obviously it seems to be set to the string that was originally parsed to create the datapoint. I’m guessing it [originates](https://help.beeminder.com/article/36-what-is-my-data) from replies to bot emails and the SMS bot and from the Advanced Entry mechanism.

Datapoints created using an API call (obviously?) sport an empty `urtext` field. What’s mildly surprising, however, is that `urtext` is populated on datapoints entered using the Form Entry method. That suggests that instead of a direct path through the API, that the data in the form gets converted to a string that gets parsed in a secondary step. Is that correct?

A short intermezzo to avoid the [XY problem](https://en.wikipedia.org/wiki/XY_problem): so far I’ve been (ab)using the `urtext` field to get at a datapoint’s original comment after it’s been edited, by capturing the EDT callback sent by the PESOS webhook. I’m using this to (dis)allow certain edits to datapoint comments (by posting to a companion goal). This worked fine, until I realized that datapoints created using the API have an empty field.

So what I’d love to see implemented, is a field called something like `orig_comment`, that gets added to the packet that’s sent to the webhook on every EDT to a datapoint. To enable other novel uses, `orig_value` could be sent as well! Does all this seem useful to other people?

---

<div class="post-metadata">

**Author:** ![philip](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/philip/32/1505_2.png) [@philip](https://forum.beeminder.com/u/philip)\
**Post date:** [May 9, 2022, 2:36pm UTC](https://forum.beeminder.com/t/urtext-and-proposed-orig-comment-orig-value/10337/2 "2022-05-09T14:36:04Z")

</div>

> [@ianminds](#):
>
> That suggests that instead of a direct path through the API, that the data in the form gets converted to a string that gets parsed in a secondary step.

In my limited experience, the urtext is also preprocessed and despite the name isn’t necessarily strictly what was passed. I’m mildly surprised that we don’t construct an urtext even for API-created datapoints.
