Hello everyone,
I would like to have a "parameter in the Live refresh with sockets"
Is there a way to have it? I tried with sockets, but the documentation only refer using socket.io with a chat.
Any tip?
For example, this server action has one parameter (home_id).

Hi Otavio,
To refresh a Server Connect
with a parameter, you need to use Emit
function/step in the API. There are 3 parts to emit a message. I have listed these below with examples.
- SOCKET: Set up a socket with a parameter
- API: Use this socket in the Emit API step by selecting from the dropdown menu under Type and selecting the value for the parameter.
- FrontEnd:
- Add
Socket
App Connect component on the page.
- In the Socket Properties - click on the Dynamic Events -> Sockets -> Message
- Click on the Inline Flow for the Message -> Action - Add a condition to check for the Socket parameter (
$event.tenant_id
as per the example) and add the Server Connect to refresh if that condition is met.
- Multiple messages can be emitted for the same socket in different APIs if required.

2 Likes
many thanks @guptast !! Will give a try!! Have a good day! 
1 Like