How to Update a different field on a page based on a previous field

I have a textbox in the top section of my page.  In a different section of that page I have a search field.  I want to default my search field with whatever they type in the first textbox.  It seems like it should be really easy but I have not found a simple way of doing it.   One option I see is to add a search attribute to my entity in the domain model and then I can call a nanoflow on leave of the first textbox and in that nanoflow I can set the search field to match the first field, but that does not seem very elegant and seems like there should be a better way. I also tried having the search textbox mapped to the entity field but I want the user to be able to modify the search and I don’t want the original field changed. Any ideas?
1 answers

Hi Ryan,

I think you are on the right track with the nanoflow. What you want is in the text box you can use the on change event. With that event you can trigger a microflow or nanoflow, then in your microflow or nanoflow, use the change activity to change the attribute of your search field. 


You can also add additional logic to check if the attribute is empty before setting the new value if the search field, that way you can prevent the case that the user types a value in the search field and then types something into the text box.


Hope this helps!