Should be super easy!- single value from Data

Hi everyone, super new to AppGyver (this week), and I’m trying to do something I know should be trivial, but I keep getting syntax errors.

I have a data set (parent) with properties Question (string), QuestionType (string), Recommender (email string), and id (string).

I want to display a single Question (based on the id) in a paragraph block and when I select a button I want to shift the paragraph to display the SEQUENTIAL Question (based on the index of the data).

How on the green bloody earth can I show just the Question from within my data?
Function: data.parent.Question…?

Thank you! I’m sleep deprived and I know this should be straightfoward.

So I assume data.parent is a collection of records, i.e. an array of objects? You can use the PICK_ITEM formula function combined with LOOKUP. So, you’d have number type page variable currentIndex which is initially 0, then have your paragraph content bound to

LOOKUP(PICK_ITEM(data.parent, pageVars.currentIndex), "Question")

First we get the item from the data.parent array by index pageVars.currentIndex, then get its Question property.

Then, simply set your button to use Set page variable flow to set the currentIndex page variable to formula pageVars.currentIndex + 1

Found my error in implementing your suggestion.

Thank you!

1 Like