Are there benefits between using inner-text or showing a binding?

I have to change almost all of my inner-text to bindings in tables. If you have a cell with a null value it will pick up a random binding from another record. Changing to <td>{{SiteID}}</td> also gives me more flexibility to add dynamic links etc.

I see no advantage to using inner-text personally.

Yep, I’m similar to you, Brad. But I do accept the FOUC scenario although it’s not been a problem for me… so far!

Not sure what you mean Brad. Probably you are not using a key for your repeat children region.

For example, I find it especially more so for date data but also happens with some strings, if I have a table that has a column of dates and some rows don’t have a date it will populate the cell from either the row above or row below.

Happens pretty much all of the time. Changing from inner-text to a binding solves it 100% of the time.

That’s very strange. Sounds like something not quite right with the query.

As I suggested:

Not sure what you mean by using a key? They are just simple paged queries displayed on the page by using the table generator. Nothing special about them.

Brad, there is an unique KEY option available for your repeat children region. Most probably you have not selected anything for its value. So that’s the reason null values don’t update on data refresh…

Where in the UI do you set it? I would love to know if there is something I have been doing wrong all this time. Thanks

Well it’s in App Connect panel :slight_smile: Select your repeat children region and it will appear in the properties.

I see it now. I will definitely give that a try. Thank you.

Maybe that should be added to the table generator UI. I would never have thought to look there for anything.

It is not a feature of the table generator, but rather it is a feature of a repeat. Two separate things.

Should it avoid it completely? I still get FOUC sometimes, even when I use inner-html (which I think should give similar results to inner-text). Is this to be expected or could something else / some problem cause it?

I think you also mentioned that using inner-text/html is faster.

Is this not the reason for putting '.default()' on any dynamic data if there was a chance that a 'null' was returned?

I suppose that would work as well. Didn’t think of that. Good idea.

Oh interesting… so .default() gives a value if the variable is null… and does it trigger in any other situation, like empty string?

For the layout issue, I often put dummy data in the binding and the variable value in dmx-text.

I use lots of spans with dmx-text inside p tags too.

Always good to hear how other people go about things.

In a repeat including BS tables if a value is null then the value in that column is not refreshed. It’s a performance issue. Adding a default so it is forced the refresh. It is Tip 1 in psweb’s Tips and Tricks.

You just need to assign a key to your repeat. If you don’t use keys then the repeater doesn’t know which rows values to update.

3 Likes