Text column wrong output

I have a table that gets generated through a PostgreSQL db and one of the columns (a tag column) hasn´t the right formatting. Its a ranking column and the data inside are six types of ratings. One of those contains a company name with two capital letters in one word. The output under the code shows the correct spelling but the spelling in the table is wrong which leads to an empty tag since its not the same as in the option list.


As you can see the format is two numbers followed by one or two words. Like I said the first one is a company name like '01 SolarCompany' and the tables puts a space between Solar and Company (01 Solar Company). Is there a way to work around this and not interfere with the other ratings? I tried different approaches and none of them worked.

I would appreciate your help immensly.
Marie

Hello @mp23!

This is a very odd bug. It seems that the parser is adding the space, I am not sure it is possible to change how the parser takes a string and turns it into a tag option.

Are you able to view the data source of the tag options?

From the screenshot it looks like the Content is set to Manual, which should have a button that is three dots ... on the right side of the option to be able to edit the final form of the tag options.

This would be able to correct for the parser since the source is being manually created by you, but. I do not see the ... on the right side which is odd. What version of Retool are you using? It might be an old bug that can be fixed by updating.

Alternatively you could switch from Content:Manual to Content:Mapped at the top and set up a variable with the correct tag names and have them created via mapping over that data source variable :thinking:

Hey Jack, thanks for the reply.
Unfortunatlly i cant access the data source of the tag options. We use the 3.33.1 version of Retool, but i couldn´t find the newest version. Switching from Content:Manual to Content:Mapped didn´t work. I am happy for other tipps.

Marie

Ahh ok that is interesting. If the column is for tags there should be a data source where we can change the formatting :thinking:

I believe in the original post you said it is a 'ranking' column, does that mean the user selects an option from a list of options, similar to a drop down?

Or is the table displaying the rankings and the options (01, 02, 03...) are column headers?

If you can share a screen shot of the table and the whole inspector panel I can better understand where we can find the data and edit it to remove the space/test if it also does the spacing for me and I can track down the bug!


As you can see I have a dashboard on the right where I can pick a ranking through a dropdown and when i save it its displayed in the table on the left as a tag. We choose a tag so that we can have that color coordinated differentiation.

Hello @mp23!

Thank you for sharing the screen shot.

Is the issue that when you selection option 01 from the dropdown that it does not display correctly?

Were you able to use a transformer to format the spacing between the two words in the name?

Hey Jack,

the issue is that it doesnt display correctly in the table. Its correct in the dropdown. It is correct in the query output overview but it isnt correct in the table. Since its correct in the query output overview a transform didnt work.

Greets

Hi @mp23 Thank you for the added context and details!

Can you share a screen shot of the transformer you are running?

It sounds like the issues is in the table's rendering of the data, but that should be something that we can fix.

Using a code block in a transformer or JS Query, once you grab the part of the table.data which contains the list of options in the dropdown then you can alter the data.

Map over each of the company names until you find the matching data for the 01 company name string. You should then be able to replace/reassign this value to a string that is formatted without a space between.

Changing it from "01 Solar Company" to '01 SolarCompany'. If that still does not work we can file a bug report to our engineering team to figure out why only that option is being changed and reformatted.

Also we can better help to debug this during our office hours as well! Check them out here.