How to iterate through Excel IA

Hello!

I have an Excel file with two columns. Column A is a series of questions, and Column B is the related response if answered Yes. What I would like to do is to dynamically present one question at a time, with a Yes and a No button on screen for the user to respond with.


After the user responds Yes or No, the response would be recorded and the experience would go to the next question. This would repeat until all questions are answered. Once the last question is answered, the user would be moved to a new scene with a summary of responses.

What would be the best approach to accomplish something like this? Can this be done in one scene? Or would scenes for each question need to be generated? Ideally, the solution would be dynamic in nature given the quantity of questions could change over time.

Thanks!

Hi Jacob @jmoss and welcome to the Intuiface community.
It looks like you are trying to create a Quiz so I’d suggest you have a look at

Once you’ve looked at these 3 samples, let us know if you have additional questions

Seb

Hello and welcome to the community @jmoss,

The questions and answers can be handled in a single scene. To do this we’re going to use an Excel data feed.

You’ll want your Excel sheet to look something like this, with a number index, the question, and the answer.

image

Drag the Excel interface asset into the scene. Change the collection to a swap collection.

Include a Simple counter interface asset to keep track of what question you’re on. Set the initial value to 1.

image

Bind the index in focus of the swap collection to the count of the simple counter.

Create a button and put it off scene. Give this button an is released conditional trigger with the condition of the count being less than the number of rows in the Excel. Then have the action add one to the simple counter.

Add another conditional trigger to that button with the condition of the count is greater than or equal to the number of rows in the Excel. Then give it the action to go to your answers scene.

On the yes button add an action to update the cell on the Excel interface asset with the row number being bound to the count of the simple counter, the column being your answer column and the value being yes.

Also add a simulate tap action on the off scene button. The add one button. Note, there is a delay start time.

Repeat these steps for the no button, changing the value to no.

Here is a link to the example experience I created.

Thanks,
Ryan

1 Like

Thank you @Seb and @rdriscoll. I was able to accomplish what I wanted using a combination of what you provided. Integrating the Simple Counter IA with the Swap Ordered Collection through bindings was the key piece I needed.

2 Likes