How do I access the value of text and numbers, of each view in a carousel?

I have a carousel with 5 views, each with a numeric/text Entry Fields (10 entries per view). After entering those values ​​I want to save them in the Database.
My question is how to access the value of each variable in each view…
Thank you very much for any comment that can guide me to the solution.

You’ll need to bi-directionally bind the Numeric Entry Field to a param of the View it resides in. That View-level param MUST be configured as in/out. For my example I’ve named that param nef_in_out in EVERY View I use in my Carousel.

# this code is in a Button which is a sibling to the Carousel
list_of_nef_values = []
for view in self.getSibling("Carousel").props.views:
    list_of_nef_values.append(view.viewParams.nef_in_out)

If any of your Views are missing that nef_in_out key this code will fall apart with an AttributeError (I think that’s the one).

Thanks a lot!!

1 Like