Hi,

I have a table widget which is populated from a table. Now I would have to show a checkbox for each row in the table and then delete all the selected rows in a single click.

So, I added a new column to the table widget and added a checkbox. But it is giving me an error "Unknown variable in 'IsSelected' checkbox" as shown below. Please advise how to resolve this.

Thank you


Hi,

Because it should be something like

YourTableRecordsName.List.Current.IsSelected

:)

Hello you need to add an new temporary atribute to your advance query or aggregate so you can save that variable.


Like Eduado said after you add that atribute to your advance query you can call it by "YourTableRecordsName.List.Current.IsSelected" where each check box has his value saved in that atribute.

in the query, u need to join your table with with another structure of boolean type :


and assign the widget check box variable with something like this:

SyntaxEditor Code Snippet

XXXTable.List.Current.Boolean.Value

If you want to select all check box, use this widget:

SyntaxEditor Code Snippet

RichWidgets\List_BulkSelect

Thank you so much, everyone. This helped to realize my mistake and your suggestions did solve my problem. But, there is one thing that i dont know - how to resolve the below warning message.

"The variable of the IsSelected Check Box inside the ContactTable Table Records is not bound to the widget's List variable."

Can you please help?

Solution

Siva Kumar Bommi wrote:

Thank you so much, everyone. This helped to realize my mistake and your suggestions did solve my problem. But, there is one thing that i dont know - how to resolve the below warning message.

"The variable of the IsSelected Check Box inside the ContactTable Table Records is not bound to the widget's List variable."

Can you please help?

I think you are using the wrong value to set the check box.


You should use: 

yourtable.list.currenct.isSelect.value 


instead of:

 

Aggregat/advancequery.list.current.isSelect.value



I am not sure if this is the problem if you could send post here a print or the OML you are doing so we can check it would be easy.

Solution

Thank you Carlos, that was the issue. I was actually using the GetContacts.List...

I updated as suggested and the warning is done. But my feature is not working. I know I did not implement it completely but not sure how to do it in Outsystems.

Actually, this is my first application in Outsystems and i built it using the help from the site. On top of that, what i wanted is to implement feature for deleting more than one contact at once. by adding a new button "delete selected". Please help.

Please find attached my .oml file.

here u are:

Siva Kumar Bommi wrote:

Thank you Carlos, that was the issue. I was actually using the GetContacts.List...

I updated as suggested and the warning is done. But my feature is not working. I know I did not implement it completely but not sure how to do it in Outsystems.

Actually, this is my first application in Outsystems and i built it using the help from the site. On top of that, what i wanted is to implement feature for deleting more than one contact at once. by adding a new button "delete selected". Please help.

Please find attached my .oml file.

Here i made some changes to you action delete selected.

that should do the job.

you need to loop the table again to see what is selected and what isn't. (there is a comment in your action that explain better)


Thank you so much Carlos, now I got it.