How to select a selected option from combobox?

How to select a selected option from combobox?

  
Hello,

I have a combobox, which I am filling using an advanced sql query.
Hence I am setting my Source Record List is the SQLList and Source Attribute  as respective attribute from return structure of the respective SQL query.

I am also setting the variable property of combbox as SQLList.List.Current.Status.StatusId
But I am always getting the last item in the list as selected one, no matter which option I select,
Please give your suggestions on the same.

Thanks

Hemlata Nerurkar wrote:
Hello,

I have a combobox, which I am filling using an advanced sql query.
Hence I am setting my Source Record List is the SQLList and Source Attribute  as respective attribute from return structure of the respective SQL query.

I am also setting the variable property of combbox as SQLList.List.Current.Status.StatusId
But I am always getting the last item in the list as selected one, no matter which option I select,
Please give your suggestions on the same.

Thanks
 
 Here's the problem, just create a Local Variable to store the selected choice. 
Diogo Mota wrote:
Hemlata Nerurkar wrote:
Hello,

I have a combobox, which I am filling using an advanced sql query.
Hence I am setting my Source Record List is the SQLList and Source Attribute  as respective attribute from return structure of the respective SQL query.

I am also setting the variable property of combbox as SQLList.List.Current.Status.StatusId
But I am always getting the last item in the list as selected one, no matter which option I select,
Please give your suggestions on the same.

Thanks
 
 Here's the problem, just create a Local Variable to store the selected choice. 
 Thank you for your reply.
But this is not working
I have a local variable. 
My list contains statusname and statusid and I want to store statusid in the local variable and refer it.
The StatusId local variable contains zero instead of statusid.
Please share your thoughts
 

Hi Hemlata Nerurkar,
        In your case you will always get the last item in the list,  dont set variable property of combbox as SQLList.List.Current.Status.StatusId, do one thing create a local variable StatusId of datatype StatusId, and bind the varible property of combobox to StatusId, bind the source attribute to the field which you want to show in UI( in your case statusname ) now whenever you will select the value from the combobox, the selected StatusID will be stored in the varible StatusId. but the current statusid in the qurey will remain same,
*dont search the selected statusid in SQLList.List.Current.Status.StatusId there is huge difference between selected and current.

I hope it will help you.

Thanks
Rajendra Singh
Rajendra koranga wrote:

Hi Hemlata Nerurkar,
        In your case you will always get the last item in the list,  dont set variable property of combbox as SQLList.List.Current.Status.StatusId, do one thing create a local variable StatusId of datatype StatusId, and bind the varible property of combobox to StatusId, bind the source attribute to the field which you want to show in UI( in your case statusname ) now whenever you will select the value from the combobox, the selected StatusID will be stored in the varible StatusId. but the current statusid in the qurey will remain same,
*dont search the selected statusid in SQLList.List.Current.Status.StatusId there is huge difference between selected and current.

I hope it will help you.

Thanks
Rajendra Singh
 
 Thanks for reply.
But this also did not work.

Let me explain you more about the issue:
I have a table records control, the source of this control is 'Title' entity and I have manually added a column with combobox which has source as 'Status' entity.
And I want to select an option from this Status list and assign it to the current record of Title record.
So, is it possible?
Please get the screenshot as below:

HI, Can you send me your oml Plz..so that i can help..
Sure, please get it in attachment.
Hi Hemlata Nerurkar, you have more recent version then mine so i am not able to open it...but i am more clear now..check the statusid in sourcetable not in query like sourcetablename.List.Current.Status.StatusId on change of combobox. i think it will work.


Thanks
Rajendra Singh
 as i said before, 

 

You should create a local variable with the same type, instead of using the query.
Hi Diogo Mota, To bind with it is not a problem, need to check the statusID in the query of source table.
Solution
Thank you everyone for you reply.

My issue got resolved.
I added StatusId attribute in Title entity and then refer it while fetching and updating

Thanks!
Solution