58
Views
4
Comments
Solved
passed change data between blocks
Application Type
Reactive

Hi, What I want to happen here is when I changed the department on the right side, it will also change the displayed department on the left side. I am using two different blocks here. I tried using a trigger event but it only passes the data to the parent but the data on the left side is on another block.


Kindly check the oml please. Thank you!

practice.oml
2023-02-27 14-18-56
Jaya Kumar S
Solution

Hi @Rhyz Dela Cruz 
      In left block the data are not refeshed that why it's not changed. Add input parameter to the left block and add onParameter change.please check the below image



and in screen(Home) add one local variable as integer and do assign in EmployeeDetailsEmployeeUpdated (client action) and pass it to Employees block. kindly check the image it may help you


Thanks

Jaya kumar S

UserImage.jpg
Rhyz Dela Cruz

your solution solved my current problem but there will be unused parameter, isn't there any other way?

UserImage.jpg
Rhyz Dela Cruz

Thank you for the idea. I did, instead of having an "integer" variable, I created a "newDepartment" Variable in the home screen and input parameter in the employee block both with department identifier. then on the client action, I assigned the new department to it and then passed the data to the newly created input parameter in the employee block. then I used the input parameter on the onchange parameter action

2021-06-02 20-50-04
Márcio Carvalho

To trigger the left side to change, both blocks would need to consume the same source, or at least the left side should consume from the screen (which is our parent). After you change departments on the right side, you trigger the change to the parent, and then you need to pass the parent, which is the employee you are updating. From there, you can find the index of the source and update the corresponding record, making the information available on the left side.

2023-02-27 14-18-56
Jaya Kumar S
Solution

Hi @Rhyz Dela Cruz 
      In left block the data are not refeshed that why it's not changed. Add input parameter to the left block and add onParameter change.please check the below image



and in screen(Home) add one local variable as integer and do assign in EmployeeDetailsEmployeeUpdated (client action) and pass it to Employees block. kindly check the image it may help you


Thanks

Jaya kumar S

UserImage.jpg
Rhyz Dela Cruz

your solution solved my current problem but there will be unused parameter, isn't there any other way?

UserImage.jpg
Rhyz Dela Cruz

Thank you for the idea. I did, instead of having an "integer" variable, I created a "newDepartment" Variable in the home screen and input parameter in the employee block both with department identifier. then on the client action, I assigned the new department to it and then passed the data to the newly created input parameter in the employee block. then I used the input parameter on the onchange parameter action

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