how to set dynamically Id of "container"

how to set dynamically Id of "container"

  

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.

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

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

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


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


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

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.