79
Views
12
Comments
Solved
How to set extended properties of a widget during the preparation step, with logic?
Application Type
Traditional Web

I want to set an extended property using logic, how do I do that? 

For example, I have:

  1. a Structure of type "Extended Property" with attributes "Property" and "Value" 
  2. a webblock with an Input Parameter of type "Extended Property List"
  3. in the Preparation Step of the webblock, I would like to cycle through that list and apply the extended properties to a widget in that webblock. This is not possible, because I cannot access extended properties of a widget. For Input Widgets, I only see "Valid" and "ValidationMessage", but no other properties.
Demo_20241029_ExtendedProperty.oml
2019-01-31 08-54-57
André Costa
Champion
Solution

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

UserImage.jpg
Jim Kamans

Too bad. I thought so too, but because I'm new maybe I overlooked something. Thanks.

2024-10-12 12-11-20
Kerollos Adel
Champion

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

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

I don't see how this answers the question, given that you mention "by some way"...

2024-10-12 12-11-20
Kerollos Adel
Champion


in case you need to pass some values to page you need to create structure store the data like 

Customer structure 

   |---------- Id
   |---------- Name
in case you need to make it dynamic you can Create list of item structure 

Item 

  |--------- Name / Key
  |--------- Value
then you get the values by filter by key name

in case you find id as key do some action with value ... etc 


2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

and how does this solve to set extended properties of widgets dynamically?

How do you set the extended property dynamically?

2024-10-12 12-11-20
Kerollos Adel
Champion
UserImage.jpg
Jim Kamans

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.

2024-10-12 12-11-20
Kerollos Adel
Champion


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. 

UserImage.jpg
Jim Kamans

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!

2026-01-26 10-25-31
Lennart Kraak
Champion

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

UserImage.jpg
Jim Kamans

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...

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.