Shorten long EmbeddedData strings | XM Community
Solved

Shorten long EmbeddedData strings

  • 2 August 2019
  • 5 replies
  • 5 views

Userlevel 5
Badge +7
Hey all,
I have something lengthy EmbeddedData strings, i.e. ${q://QID194%232/ChoiceTextEntryValue/1/1}, that are affecting my column sizes in Matrix Tables and I'd like to know if there's a way to shorten these strings or, at the very least, adjust the columns so they don't look so aesthetically horrid.

Scenario: I have a Matrix Table with 8 statements (Plan 1 through Plan 😎, first column is open text column called "Plan Name" (attachment: Benefits - Plan Name). The survey taker will input a plan name for each plan they have and these plan names carry through to multiple questions further down in the survey. For instance, the very next question is another Matrix table where the statements are these 8 strings, carrying down the responder's answer(s) as the statement(s) (Attachment: Benefits - Plan Name EmbData).

Here's where the problem comes in. In one table, I need to use the plan names from the first table as Column Titles in a Matrix Table and because the string is so long, it makes my simple table very wide with a scollbar I want to avoid (Attachment: Benefits - Long EmbData strings). Does anyone know a way around this problem or a workaround? I could user JavaScript to adjust the column headers, but I hate to do the dev work if there's a simpler solution. Thank you, all!

- Jeremy
icon

Best answer by TomG 5 August 2019, 20:02

View original

5 replies

Userlevel 7
Badge +11
Are the plan names themselves really long? Or is it just the strings that you have in there that are really long? I could be wrong but I believe that the table updates based on the actual content.
Userlevel 5
Badge +7
Hey Jen! The way I've found matrix tables to work with emb data is the table headers (as well as statements) take an average of the columns you have and spread them out across the page. This works if all 8 are selected (first attachment), but not so well if only 4 are selected (second attachment). I'd love to be able to set these manually as the fields are dollar amounts and as such set to 'short'. I don't like how much white space is between each option when the table automatically sets the width.

The solution in my head was to see if I could shorten the column names and manually set the column widths while editing the survey. Thanks for your time!
Userlevel 7
Badge +11
Ah, I gotcha! I don't know of a native way to set the width of the columns to something specific so I'm thinking you're right in that Javascript would be a good solution.
Userlevel 7
Badge +27
@Jeremy,

You'll have to use JavaScript to adjust the column widths and spacing.
Userlevel 5
Badge +7
Thanks Tom, will do!

Leave a Reply