Hello all. In the screenshot you can see a nested container with a width set to 400px. What I would like to do is dynamically set that container width to either 200px or 400px depending on the length of characters of the expression contained within it. How can this be done?
HelloYou can try create a two classes for both like
.small-text-container {
width: 200px;
}
.large-text-container {
width: 400px;
and apply to container attributes asclass = if(Length(expressionValue) > charNum, "large-text-container", "small-text-container")P.S. I mixed up 'styles' and 'classes' in my explanation
Hi @retkasvb ,
you are confounding styles and classes in your reply / example
Hi Richard Dwyer,
We can achieve this by using extended property of the container.
By finding length of your expression value we can apply condition in it according to your scenario.
In the OML I did with style, we can do with the class also.
Please find below OML for your reference and any concern let me know.
Regards,
Rajat
Hi @Rajat Agrawal ,
on the form :
please say in your post what you are doing in your oml. The way you are doing it now, you are forcing everybody who reads this post to download and open your OML.
on the content :
inline styles are not a best practice, if you know of better solutions (like in this case with classes) don't propose the lesser solutions.
Hi @Dorine Boudry ,
Hope you are doing good.
I also explained in the content and also attached OML if the source wants to check. I am not forcing anyone, just trying to help in the minimum comment. I'll try to keep it as simple as I can going forward. Thank you for the feedback.