What is the right osjs syntax for setting a container from a database field

What is the right osjs syntax for setting a container from a database field

  
Hello support,

I use the mouseover option in a cell of a table to show another container. Therefore, normally I use the hard .Id of that certain container.
Now I like use a variable value conform the address of the cell. This is the value from a field of a database record.

My question is, using the osjs is this the right syntax?

"osjs(# set value='"+RecordTable.List.variable_container_ adress+"'/).show();"
Hello Rob,

Can you explain your doubt in more detail because it's a little bit confusing..
The syntax you're using is also strange..
Explain your requirements first..Then I'll try to do my best to help you..;)
Just a tip about the correct way you should use when you use the jQuery version provided by the platform:

For example, when you want to apply a script to show a certain hidden container (div), you can do the following:

"osjs('#" + <The ID of the element you want to show> + "').show();"


Best Regards,
Gonçalo M.
Hello Goncalo,

The syntax you give me is the syntax that works. No problem. But  <The ID of the element I want to show>  is the hard ID selected from extended property list. This is a hard ID and osjs will work.

Now I like to change the <The ID of the element I want to show> to a variable, reading from a database file.
I changed the  <The ID of the element I want to show> into
"osjs(#'"+OpnameRecordTable.List.Current.position+"').show();".

The value between the ++ is a field reading from a file. I checked the value and that has the same value as the div, but running the application, the div will not appears.
I think that the application will only accept the hard .Id value and therefore I think, that the syntax is probably wrong.

With kind regards,
Rob
Rob Engler wrote:
Hello Goncalo,

The syntax you give me is the syntax that works. No problem. But  <The ID of the element I want to show>  is the hard ID selected from extended property list. This is a hard ID and osjs will work.

Now I like to change the <The ID of the element I want to show> to a variable, reading from a database file.
I changed the  <The ID of the element I want to show> into
"osjs(#'"+OpnameRecordTable.List.Current.position+"').show();".

The value between the ++ is a field reading from a file. I checked the value and that has the same value as the div, but running the application, the div will not appears.
I think that the application will only accept the hard .Id value and therefore I think, that the syntax is probably wrong.

With kind regards,
Rob
 
 Hey Rob,

I think that you make a little mistake in the ID of the DIV you want to show.
OpnameRecordTable.List.Current.position to me returns a number instead of an ID of a DIV.
Are you sure it's the same ? The rest of the syntax is OK and should work.

But to get back to the problem: what are you trying to achieve ? 
Show a specific DIV in a table ... ?
Do you have already the DIV in there ?

Can you show a part of the HTML and point the thing you want to show.

Joop
He Joop,

Yes I am sure. The adress of the div is for example "cel1" and de value of the field <position> is "cel1.Id".
Normally, I would say, the syntax will be oke and should be working, but it don't. 

I think, that in background, the (compiler of interperter?) accept only a hard Id, becuase the value of the field <position> has an Id in it . 

Sorry, but I dont have a HTML source file.

Rob
Rob,

Try it in Chrome and open up the console to see if there are some errors ...
Might help. 

The ID's of the div's are generated when the page is rendered, so it shouldn't be a prolem.
I also use this kind of constructions for instance to have a clickable row in TableRecord ...
Hi bob,

Can you upload a little sample of what you trying to do?
Maybe theres a simpler way to do what you need.

The concept of having id's hardcoded in the database is kinda wierd.

Regards,
João Rosado
Hi Rob,

I think we have here different issues.
First of all, the syntax using 'osjs' is equal to the one used with '$', because that's just a way to represent the usage of the jQuery version of the Agile Platform.
The concept of having id's hardcoded in the database is (as João said) "kinda wierd"..As a good practice you should avoid that.
I don't know your real pretended target, but if you have for example a TableRecord and a certain div in a cell, you should give a name to that div, which will create a RunTime generated Id that you can use in the jQuery script and then control the position of the div with logic, according to the cell index.
But is easier to help you if you describe your target/requirement...

Best Regards,
Gonçalo M.
Rob,

I think what you need to do, is assing the value of 
OpnameRecordTable.List.Current.position also to the DIV as ID or as NAME in an extended property