listboxes and webservices

listboxes and webservices


For the last couple of weeks i've been working with your outsystems platform and it's quite good. However i came across a problem while working with it, which goes as follows:
I have set up web services to communicate with an sql server somewhere else.(For instance, if u send in a studentnumber and request results, u get all results back from that student) So far so good.
However if i want to split parts of the information, for example if i want to give a student the possibility to not check all his results, but all his results for 1 year, i get issues.
The most obvious way of giving a small list of choices to a student seemed to me to be the listbox. However, i cant use this, because of the selection attribute. (the boolean that tells outsystems whether or not a choice was made, and more exactly what things were chosen)
This forces me to set up the database inside of the platform, which is not allowed in my assignment.
Basicly my question boils down to this: Is it possible to use webservices in combination with list boxes?
My apologies if this question has been asked before, but i couldnt find it anywhere on the forums

kind regards,
I don't really understand what you exactly need, but can't you put the result of the web service in a record list, filter that list and use it in the combobox?
Hi Arthur,

You should be able to use a ListBox in that scenario - your boolean attribute doesn't have to be bound to an entity column, it can be bound to a structure.

Note that the usability of the ListBox is far from great... you may want to use a ListRecord or TableRecord with checkboxes for allowing the user to select the rows (in a similar way, you would bound the checkbox to a boolean field from a structure).

If you want a fancier approach, check out the Multiple Selection Filter component (haven't tried it but it seems nice for the usage you intend to have).
Still on how to build a multi-select ListRecord or TableRecord, you may want to see this topic:

Thanks for the replies, ill be trying these methods and let you know if and how i got succes.

Update: So far i haven't reached the intended goal, but i do believe theres a good solution here.
I have been trying to use the checkbox technique as stated: "Note that the usability of the ListBox is far from great... you may want to use a ListRecord or TableRecord with checkboxes for allowing the user to select the rows (in a similar way, you would bound the checkbox to a boolean field from a structure)."
This would work, if it werent for the fact currently my webservice results are saved inside of the service(in the data bar its under structures/services.) The problem with this is that im not allowed to add attributes to this. If i can store the service results inside of a different structure and add the boolean attribute, with default = false, i can use the technique u mentioned.
So what I'm left wondering is how i (temporarily)* copy the results of the web service into a new structure, so that i can use that structure.
*at the end of the screen action, when all results are processed, it would be nice to clear out the database again, so it wouldnt fill up every time a user makes a new request. However getting the structure in place is the priority.

Once again, thanks for the replies.

Kind regards,
Im actually still stuck on this. The no responses lead me to believe that updateing a post doesnt reflag the forum post.

Kind regards,
Hello Arthur,

It seems that your current problem is "just" that your structure is closed and you need to add a boolean attribute to it so you know which entity is selected.

Fear not, the OutSystems Platform has the solution for your problem (if this is it...).

When defining a record list, you have to select a record type. What most people don't know, is that you can use more than one record to define a list. If you double click on the Record Definition property (or select the "Record Editor" option from the drop-down) you'll see the following window:

Here you are able to select several structures to compose the elements of your record list. Richwidgets already gives you a "Boolean" structure which is a perfect addition to your structure.

With this you should be able to create the record list you require for your programming. You might need helper functions to build this record list from the one provided by your web service, but that should be pretty easy :)

If I misunderstood your current problem or if this solution doesn't help, let us know.
Not only does this look like the solution, the wording of the problem is also better.
Thanks a bunch for the response.