Identify the Data Type of Values in Coda

I have the code below:

ForEach(Codes.Filter(Jurisdiction=thisRow.Jurisdiction AND [Doc Type]=“Integrated”),Concatenate(CurrentValue.[Adopts Publication], “,” , CurrentValue.Year)).Unique().FormulaMap(Codes.Filter(Jurisdiction=thisRow.Jurisdiction AND Codes.[Adopts Publication]=CurrentValue.Split(“,”).First()))

I dont know whats wrong my query, it doesnt return anything. I’m suspecting the line of code below since everything works beforee adding it.

Codes.[Adopts Publication]=CurrentValue.Split(“,”).First()

I wonder what makes this condition false, when in fact they have the same value. Maybe it is because of their data type. Maybe the first one is a simple text and the other one is a different data type. So my question is , how will I know the data type of the values I’m trying to use?

Any chance you will throw up an example doc?

2 Likes

Hi @Alyssa_Gono , difficult to answer without the context.
Often this is an issue of format, trying to compare an object to a text. Than can sometimes be solved adding .ToText() (or .ToNumber() or .ToDate()) in the both side of your comparison, to be sure to compare what’s possible to.

1 Like

I tried converting them to text using ToText(). May be the dimensions are different. Maybe the other one is an array. how to know it ?

As @Scott_Collier-Weir suggested, share an example :wink:

1 Like

I dont know how to do it. Sorry just a newbie.

Just a link is all you need! A link to your doc

1 Like

Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit.

Coda’s instructions here: Sharing your doc | Coda Help Center

You may want to first create a copy of the doc and strip out any sensitive information, if any.

First, change “Anyone with the link” to “Can View”


Then, you can either share the link directly here, or Embed like so:

1 Like

You can do it! You post a lot in this community which is great - but always without any examples or screenshots.

It’s really helpful not just for us when trying to give you support but it’s also really helpful for future viewers if you can share a doc, embed a doc, or share screenshots at the very least.

3 Likes

Coda gives you visual hints when writing a formula to know what types of data you’re using and the data type of the result :blush:

If you look at the screenshot above, you’ll see tiny icons next to each “thing” I used in my formula :blush: : Those icons represents the data type of those “thing” (:sweat_smile:)

So you can see that :

  • Table is a table
  • CurrentValue.[Column 2] is a number
  • [Column 3] is a list of numbers

(Date(s), Time(s), DateTime(s), Text, row(s)… and other data types also have their dedicated icons)

And if you have a doubt, you can always click on one of the “thing”/pill and the Editor will give you more info about that “thing” (which is what I did for CurrentValue.[Column 2] :blush: )

As for the data type of the result/output of the formula, it will also be represented by a small icon at the far right of the previewed result :blush: . If once again you have a doubt, you can hover the icon with your mouse and Coda will tell you what type it is :blush: .

As for knowing what could be wrong with your formula, I have to agree with the others : Without a sample doc or even just a screenshot, this is hard to tell :confused:

3 Likes

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