I want filter based on floor(lantai) input, how do I get Rooms(rom) by floor(lantai)? to be like an expectation.
Hi Arvin,
I am not sure if I understand your question, but if I do what you need to do is to add a filter to your aggregate where floor(lantai) equals the variable with the floor that you want.
https://www.outsystems.com/help/servicestudio/9.0/Using_Data/aggregates/Filtering_Results.htm
Best regards,
João Nobre
João Nobre wrote:
I've done filtering data like the example, now how to get the floor list value ?
You will have to:
or
Typically the first approach is discouraged, and Service Studio will likely warn you, as Aggregates (even if accessing LocalStorage) have a relevant impact on mobile App performance.
Jorge Martins wrote:
can you give me a simple example for the logic of the 2nd option ? because my problem is on the logical implementation.
Arvin Fairuz wrote:
Here are instructions, and how I would organize the action flow:
In the end you will have a list of "floors" (RoomsByFloor), and each "floor" will have a list of rooms on that floor.
You should be able to come up with this short algorithm on your own, logical reasoning is an essential skill for any developer that I encourage you to exercise more (you can find lots of exercises online on algorithms and problem solving)
Thanks for the replies Jorge,
maybe you can share your .oml so I can learn it properly and correctly.
HI Jorge,
I have followed your direction, how can I take the list room based on floor value?
you can see my .oml
Thanks,
Imas Deny
Jorge,
Once you have the list structures from your own logic (suggestion two), does it not still require a separate web block to nest the list? Is the use of multiple aggregates acceptable practice in the web environment?
I have a similar scenario (orders, shipments, and items in shipment) and was going down the road of multiple web blocks, with multiple aggregates, but if there is a way to nest several lists from structures (instead of the web blocks), that may be a better practice...
Thanks.
Probably you want to get the value from a user Input from the screen. If so you must have a way that the user inputs the floor value (like an input field or a dropdown) on your screen and a submit button, the input will have a variable associated with it (you can create a local variable and associate it with the input). In the button action you do your aggregate and use the variable associated with the input for filtering.
I think it will be good for you if you take some time to do OutSystems Lessons (that have some good examples of how to start using the platform):
https://www.outsystems.com/learn/
Hi Joao,
but here I don't to take from the dropdown, but I want to take the floor list of the field (lantai), like the picture below:
Arvin
Arvin, I provided detailed instructions and no OML on purpose.
The screenshot I took was after following those instructions to the letter to make sure they were correct. Please try them for yourself, and if you have doubts I can further explain, but I believe providing an OML for this will be counterproductive.
I tried it but why cant I use this append?
Not only you can, but you actually must... that's described in bullet 7.:
On the True branch of the If tool, add a ListAppend Action, name it AppendRoom and on the ListInput Parameter pass it the RoomsByFloor.Rooms, and on the Element Input Parameter pass it GetFloorRooms.List.Current.FloorRoom.Rom
when you give a name to an Action on the Action Flow, its label changes to reflect the name you've just given it:
You can always select any action in an action flow and will be able to check on the Properties panel on the bottom-right part of Service Studio what is the Action (for the selected Action on the screenshot you'll see the Action property has the value ListAction).
For List manipulating actions, you can actually identify which Action is being used by the Action icons:
Hi Jorge,
Yes I understand the instructions, but the problem is why I cant use these tools. I cant drag those tools into branch. Not about I cant do it. I dont know why this cant be used.
and the choice is no ListAppend.
Ah, I get it...
You're trying to drag Client Actions to a server-side Action Flow (a Data Action runs on the server, not the device). Scroll down to the Server Actions folder, and you'll see the equivalent Server Actions under the (System) reference, those you will be able to drag to your Action Flow.
If you don't see the actions you need, you may need to go to the "Manage Dependencies..." popup and add those Server Actions from (System).
I did not find what I need in Server Action Folder, then I want to add Server Actions in Manage
Dependecies. How to add it?
By default (sometimes) Service Studio will filter your Dependencies to only show what you're using or modifying. In your case, check your 'Public elements' filter (highlighted red in the screenshot):
Hi Imas,
Following you can find several remarks about your module (and my previous instructions)...
In my instructions, the following step is wrong, assuming that RoomsByFloor structure defined its Floor attribute as an Integer
It should read something like:
Careful, if your floors start from 0 you should come up with a default value for RoomsByFloor.Floor that cannot occur in your data set. If it makes sense for the Floor attribute to be Text then change it on the RoomsByFloor structure and keep the Condition above as is.
That being said, you have several problems in your module, mostly because you skipped/adapted steps from those instructions as I didn't know where you'd want to implement that logic:
Hope this helps
thanks your reply before, simple question, how to show the room data in list by floor, like image below :
In OutSystems you use Expressions to evaluate and display dynamic data.
I highlighted how you can get the floor number... you just need to have an Expression with that value before you display the list of rooms.