Form only showing the first record

I'm struggling with the following situation: 

I have a one screen of rooms that contains a list of rooms reserved on the hotel. 

When I click on the number, it takes me to the Edit Room screen which works.

However, no matter the record I press to edit, on the 1st screen, only the first record on the list is presented on the edit screen. 

This is made by using a link on the 1st room screen. 

The app runs with on errors but I can't seem to figure out the what is the problem. 

Could anyone help a super junior? 

Thanks

Xnip2022-04-12_14-20-12.jpg

Hi Tiago,

From the image, I can see that you have a 'RoomID' input on another screen (probably the form?) that has a yellow underline, showing a warning. Is that because you're not using it? You should filter the form aggregate with it, so you can have the record from that id.

Hope this helps

Thanks Laura

Agree with the Laura Fidalgo , in adding to that put the filter on the room details screen(assuming the name as room details) aggregate(rooms)
As

rooms.id=RoomId so your waring related to input parameter(yellow line will be gone) and you will able to get the record with respectiveRoom Id



Thanks and Regards,

Akshay Deshpande

Thanks for your help. Really appreciated!

Hi Tiago,

From the image, I can see that you have a 'RoomID' input on another screen (probably the form?) that has a yellow underline, showing a warning. Is that because you're not using it? You should filter the form aggregate with it, so you can have the record from that id.

Hope this helps

Thanks Laura

Agree with the Laura Fidalgo , in adding to that put the filter on the room details screen(assuming the name as room details) aggregate(rooms)
As

rooms.id=RoomId so your waring related to input parameter(yellow line will be gone) and you will able to get the record with respectiveRoom Id



Thanks and Regards,

Akshay Deshpande

Thanks for your help. Really appreciated!

Hi Tiago ,

I have created a demo application for above issue you have raised .

Please check by below url and find attached oml.

https://rahul-jain-doitlean.outsystemscloud.com/Application/Rooms

Thanks

Rahul Jain


Thanks Raul for your output and your time. How do I download the file tought?

On the same subject, on the detailed rooms screen I have a rule on save that: 

Needs to verify if the room number was changed (before save), if yes, then Create a new Record, but if i only changed the price, then the record should be updated.

However, I;m unable to write this in the If because Im not able to reach the number in the input form of the details screen, as on the picture.

Could you help also?

Xnip2022-04-12_15-48-31.jpg

The action on save

Xnip2022-04-12_15-46-56.jpg

Hi again Tiago,

You need to look to the form value, not the input widget. So you'll need to check the value from the source of you form (the aggregate)

Laura, I understand but the problem is that on this scope I cant find the form value. 

What am I missing here?

Xnip2022-04-12_16-32-09.jpg

You need to open the Rooms ace the aggregate and see the current value. Since the rooms aggregate is the source of your form, the value is there when you change it from your inputs

Nevermind. I found a much better solution. On the save action I'll use the CreateOrUpdate server action to do all the work form me. Now seems to be working. 


Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.