1809
Views
7
Comments
how to set dynamically Id of "container"
Question

Hello Guys,


I need to set dynamically the id of container. Can i do it? 

for example: My screen has one list and the list item was defined like a 'Container', so i need to set id of this container like a "identifier" of my current list item, are there some way to do it? it's because i will use one js to jump to element in screen (Like HTML Anchor).


Thank you guys.

2024-04-24 19-28-09
Justin Babel

Hi Geuvan,

Under the extended properties of the container, you can add a property of 'id' with the value of the RecordList.Current.Record.Id. This will give the container an id of the current records identifier. I think this is what you are trying to achieve.

Let me know if this helps,

Justin

2022-07-07 18-45-50
Niels Favreau

Justin Babel wrote:

Hi Geuvan,

Under the extended properties of the container, you can add a property of 'id' with the value of the RecordList.Current.Record.Id. This will give the container an id of the current records identifier. I think this is what you are trying to achieve.

Let me know if this helps,

Justin

If thats the case, this means there are a lot of undocumented extended properties...


2024-04-24 19-28-09
Justin Babel

Niels Favreau wrote:

Justin Babel wrote:

Hi Geuvan,

Under the extended properties of the container, you can add a property of 'id' with the value of the RecordList.Current.Record.Id. This will give the container an id of the current records identifier. I think this is what you are trying to achieve.

Let me know if this helps,

Justin

If thats the case, this means there are a lot of undocumented extended properties...


Not 100% sure what the documented extended properties would be, but in my experience, you are able to put whatever you please in the extended properties (that makes sense), except for in some circumstances, the extended property won't override what the platform already generates for specific properties.

Justin

2020-10-02 21-47-41
Samuel Nunes Marques

Hi Geuvan,

I'm not sure if you can assign an Id because the platform generates one for each element and you can not edit it. But you can use an extended property to add a class for example or another html attribute chosen by you, as Justin explained. Hope it helps.

My Regards,

Samuel

2024-04-24 19-28-09
Justin Babel

Samuel M. wrote:

Hi Geuvan,

I'm not sure if you can assign an Id because the platform generates one for each element and you can not edit it. But you can use an extended property to add a class for example or another html attribute chosen by you, as Justin explained. Hope it helps.

My Regards,

Samuel

Yes, sorry, forgot to mention that if your row already has a platform generated runtime id, I do not believe the extended property of 'id' will override it. 

But like Samuel said, you can just add a different extended property that you can reference as the selector in your JS.

Justin


UserImage.jpg
Geuvan  Junior

Hi Guys,

Thank you for your help, and i can't set id in extended properties (was my first try.. hahaha), but i am thing to set class atribbut and use my JS under it.

UserImage.jpg
anushka bajpai

Hi Geuvan,

The containers in OutSystem have an id assigned to them implicitly. So, In case if you are trying to add an extended property named as 'id', it won't work. You will have to give it some other name before using it as shown.


Let me know if this helps.

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