I want to set an extended property using logic, how do I do that?
For example, I have:
In OutSystems, extended properties are generally applied statically in the properties pane of a widget and cannot directly be modified dynamically through logic during runtime.
This is a limitation for widgets like Input elements, which means you can't dynamically apply or modify their extended properties through the preparation step of your screen or web block.
Maybe you can try it with CSS Style classes
Too bad. I thought so too, but because I'm new maybe I overlooked something. Thanks.
Dear @Jim Kamans ,
i think not applicably in out systems run time property adding , but you can work around by adding list of { Value , Key } in structure and use it as input this pending you values on it and by some way you can find way to deduct your target value by using filter over key
I don't see how this answers the question, given that you mention "by some way"...
in case you need to pass some values to page you need to create structure store the data like
Customer structure
|---------- Id |---------- Namein case you need to make it dynamic you can Create list of item structure
Item
|--------- Name / Key |--------- Valuethen you get the values by filter by key name
in case you find id as key do some action with value ... etc
and how does this solve to set extended properties of widgets dynamically?
How do you set the extended property dynamically?
by adding it as property at first :-)
I already made a structure with list {Key, Value}, see the .oml file for my implementation.
My question is: given this list {Key, Value}, how can I use them to set extended properties on a widget, for example an Input widget? It looks like this is not possible (like Andre says in https://www.outsystems.com/forums/discussion/100001/how-to-set-extended-properties-of-a-widget-during-the-preparation-step-with-logi/#Post433917), because I only have access to the properties "Valid" and "ValidationMessage" of an Input widget.
Let's agree that accessing the existing control to build on it is challenging. However, there are several alternative solutions, each of which comes with its own side effects.
You can create a clone of this control, but it’s important to note that you won’t be able to update this cloned version if OutSystems releases an update for the original control and add any property you need like any control you create .
If I can have control over the text box without cloning it, and instead add it inside the control that I create, it would be better. This would allow for custom settings and additional functionality
I hope this comment is helpful to you.
You can create a clone of this control-> This is like building your own component with C# code, right (but you don't start from scratch, because you start from the clone)? Yes, this is probably a solution. I have not used this and my co-workers prefer to stay with the default components OutSystems provides (and sometimes a Forge component). I will specify this in my next (relevant) questions.If I can have control over the text box without cloning it, and instead add it inside the control that I create, it would be better. This would allow for custom settings and additional functionality-> Sorry, I'm not following you. Can you specify in more detail? How is it possible to "have control over the text box without cloning it"?I hope this comment is helpful to you.-> Thanks for replying, it's greatly appreciated! I want to learn more about OutSystems and learning from more experienced people who want to help is helping me a lot!
Hi Jim,
Can you explain a little more what you're trying to accomplish with this?Personally I've never encountered the need to do something like this.Regards,Lennart
We have a lot of applications that use an Input-widget for saving a certain kind of data, but we want to replace all of those with a custom webblock. Problem is, those Input-widgets are all implemented a bit differently (for example, some need an extended property tabIndex, os the user can TAB through the form for filling it in). I wanted to make a generic solution for this, where it is possible to pass a list of {Key, Value}-pairs that will be used to set the extended properties of the widgets inside the webblock. I used this same solution in a React-project, so I thought this was maybe possible in OutSystems too. But probably not...