Hi,

I'm making Assignment Bookings extra here, this is my Request button action:

Check the error in this video: https://drive.google.com/file/d/1nflWJGllW9uGb0B89lS-mCqehkcHFyLj/view?usp=sharing

Thanks

Hello, the error is probably caused by the getroomservice  action.   You are trying to find a roomservice with id of null (or 0). You must use the same variable on the GetRoomService action that you assigned to the dropdown widget on your page. 


That will make the error go ahead but it will not make the logic work yet. You still need a CreateOrUpdate after the Get  action to save the selected roomservice into the database.


Hope this helps.

Vonnelize Haupt wrote:

Hello, the error is probably caused by the getroomservice  action.   You are trying to find a roomservice with id of null (or 0). You must use the same variable on the GetRoomService action that you assigned to the dropdown widget on your page. 


That will make the error go ahead but it will not make the logic work yet. You still need a CreateOrUpdate after the Get  action to save the selected roomservice into the database.


Hope this helps.

Hi Vonnelize, Thanks for the reply

seems like I use the same variable GetRoomService action, and I added CreateOrUpdate after GetRoomService action as you said

but, I still got an error


Solution

You need an assign statement between the Get action and the Update action. On the Get action you are fetching the record that you want to update from the database. You then need to use an assign statement to change the record that you fetched and then update the record with the changes you made.


However, the logic on your action does not make sense to me. What are you trying to accomplish on the Request button? Are you trying to request a service to be delivered to the room? In that case you should not use the GetRoomService action. You should probably have an assign and then a createRoomService action.

Solution