Post

1 follower Follow
0
Avatar

API query from app URL or OID (object ID, data-ident)

I'm parsing a table in a custom panel with an iframe that renders some Clarizen data in a table.  I need to run API queries from the data I parse from the table.  I see two bits of identifying info in the table, href and data-ident (HTML snippet below); I believe that these are the app URL and the OID (object ID).  I *cannot* find either of these data on the object through the API.

How can I query the objects through the API with these bits of data?

Thanks in advance!

<span class="o-val align-left word_nowrap name-text"
style="margin-left:69px;display:block;margin-right:20px;">
<a href="/Clarizen/Task/11070838785"
class="obj-name-val"
target="_top"
onclick="return showInOpenerWindow(this);">prep phase 1</a>
</span><span class="field-edit-icon"
title="Edit"
style="right:20px"
data-mousedown="openEditor"></span><span class="g-multi-preview"
title="Quick Peek"
data-ident="8.11070838785.30736129"
data-linkident="0.0.0"
data-shortcut="false"
data-ctrl="QuickPreview"
data-mousedown="show"
data-mode="multi"
data-sngtn="1"
data-parentident="6.11070791809.30736129"
data-mainobjectislink="false"></span>
Joe Zamora Answered

Please sign in to leave a comment.

1 comment

0
Avatar

Answered my own question. :-) I created a formula-based custom field to extract the OID (object ID) from GetObjectUrl(). Now I can run lookups with this OID. I created the following formula field on the User and WorkItem objects:

C_OID =

RegexReplace(GetObjectUrl(CurrentObject()), '.*(\\d+\\.\\d+\\.\\d+).*', '$1', FALSE)

Curiously, at first I tried to create the formula field on the Task object, but it wasn't retroactively calculated for existing objects. I deleted that one and defined it on the WorkItem object and it worked!

 

Joe Zamora 0 votes
Comment actions Permalink