- Thu Mar 22, 2018 3:18 pm
#813762
I have a dropdown (shipping_address) which which has a sql query like this:
I don,t understand why I MUST choose a suggest result so the shipping_address appear
Code: Select all
optional shipping client is a suggest control with this query: WHERE C.ID = @@optional_shipping_client
Code: Select all
In a trigger in the task before this task, I set these variables:SELECT ID,NAME AS optional_shipping_client FROM TABLE
Code: Select all
And in Javascript I set them like this (I don,t know why but I lose these values if I don't do this) @@optional_shipping_client_test = $resultClient[1]['ID'];
@@optional_shipping_client_test_label = $resultClient[1]['NAME'];
@@optional_shipping_client = $resultClient[1]['ID'];
@@optional_shipping_client_label = $resultClient[1]['NAME'];
Code: Select all
The problem is that when I set the value programmatically , the dropdown shipping_address doesn't have any value. If I remove one character from @@optional_shipping_client and I select the name of the client (in the suggest), it works. If I alert the @@optional_shipping_client it has the same value that the suggest returns and it has the same label.if($("#optional_shipping_client_test").getValue() != "")
{
$("#optional_shipping_client").setValue($("#optional_shipping_client_test").getValue());
$("#optional_shipping_client").setText($("#optional_shipping_client_test_label").getValue());
}
I don,t understand why I MUST choose a suggest result so the shipping_address appear