Repeater widget line break

repeater-widget

#1

I don’t know if this is the right place to put this, or if its technical bugs, but in the past I have had to create repeaters in Axure that have text that require multiple lines with custom line breaks depending on which item it was.

For instance, if I am dealing with addresses that have a variable amount of lines in them, with some lines shorter and some lines being longer, I needed a way to say if it should move to a new line or not.

In Axure 7, I found a workaround using </br>, but the problem is that it no longer seems to work with Axure 8, It just shows “</br>”, as shown below:

What’s in the repeater table:

The output:

Axure 7:

Axure 8:

I was wondering if there is another way around this problem, or if this could be possibly fixed within Axure 8. Thanks!


#2

wow, i wish I knew you could use </br> in axure 7 …

you could break the address into separate columns Address1, Address2, City, State, Zip and then format as desired (like image) . Address2 could be blank, so you would have to write 2 cases with or wihout Address 2 to avoid blank row. this certainly not as clean as with line break


#3

I am encountering the same problem as Alex. I tried using String.fromCharCode(13), but could not get it to work. Perhaps my syntax was wrong. I was not able to place String.fromCharCode(13) as a local variable. I tried to use it in a global var, but it also was not interpreted. Any idea?

Thank you!


#4

Hi Ezra,
If you are assigning values inside repeater, try to reference the repeater column. For example if column title is “text” and you are looking to extract the first 13 characters you could use [[Item.text.substring(0,13)]]


#5

Hi all,

having the same issue but my texts are more like letters:

Dear Mr.

Lorem Ipsum…

Lorem Ipsum…

Regards

This text is set by a form the user can fill. Set variable to Text_Field. `(it’s pretty much a Messaging application i’m trying to prototype)

Is there anyway i can get this to work? Unfortunatly i’m at the very (VERY) Basics of Java and developing…

Best regards
Funkal


#6

Hi everyone,

You can get line breaks into the repeater dataset in RP8 by replacing a character or group of characters in the row with a newline character OnItemLoad. So, if you use <br> tags to indicate line breaks in a cell’s text, your Set Text action should use [[Item.ColumnName.replace("<br>","\n")]].

I hope this helps!


How to insert line break in a repeater?
#7

Great! That did the job :slight_smile:

Bests
Funkal


#8

Great tip! I’ve had a similar problem with using in Axure 7 to get multiple spaces in a row. Is there a similar trick for this? Using the character code for NBSP (\a0) did not work.


#9

Hi PixelPhil,

Thanks for pointing this out as well. As you’ve noted, normal vs. non-breaking spaces are handled differently in RP 8. In this case, since normal spaces get set as non-breaking spaces in repeater-set text, it may help to similarly replace the existing entity via [[Item.Column0.replace(" “,” ")]]. Hopefully that can help!

Alex


#10

This does not work for me (anymore? version 8.0.1.335).
What does work is the use of “\r\n”, this is the standard javascript notation of a new line.
For my situation it looks like this:
[[Item.data.replace(’<br/>’,’\r\n’)]]


#11

I had similar issue and I tweaked it to make it work.
Try[[Item.address.replace("<br>","\n")]]


closed #12

unlisted #13