Hi @Tunn ,
Could you please share a screenshot about your app's configuration?
How do you list your questions from your Excel table? Using Gallery control?
Do you want to sum all score values within your app after the user answered all questions?
Based on the needs that you mentioned, I think you need to set up a collection as a data source within your app to collect user's answers. I assume that you added a Gallery control within your app to list all available Questions from your Excel table, is it true?
I have made a test on my side, please consider take a try with the following workaround:
Add a Gallery control in your app, set the Items property to following:
'YourExcelTable'
Within the Gallery, add a Label (Label1) to display question, and a Text Box (TextInput1) to collect user's entry. Set the Text property of the Label to following:
ThisItem.Questions
Outside the Gallery, add a Label to display the final score value. Set the Text property of the Label to following:
"Final Score Value is: " & Sum(
ForAll(
Gallery1.AllItems,
If(
!IsBlank(LookUp('Your Excel Table', Questions = Lbael1.Text && Answers = TextInput1.Text)),
1,
0
)
),
Value
)
Please consider take a try with above solution, then check if the issue is solved.
Note: The Questions, Answers represents the column from your Excel table.
In addition, I also agree with @datamaster 's thought. You could also consider save your Excel table records into a Collection, then modify your Collection data based on user's entry.
Set the OnStart property of the App to following:
ClearCollect(LocalTable, 'Your Excel Table')
Add a Gallery control, set the Items property to following:
LocalTable
add Label control and a Text Box as above to display question and collect user's entry. Outside the Gallery, add a "Calculate" button, set the OnSelect property to following:
ForAll(
Gallery1.AllItems,
If(
!IsBlank(LookUp(LocalTable, Questions = Label1.Text && Answers = TextInput1.Text)),
Patch(
LocalTable,
LookUp(LocalTable, Questions = Label1.Text && Answers = TextInput1.Text),
{
Score: 1
}
)
)
)
Add a Label to display the final score value, set the Text property of the Label to following:
"Final Score Value is: " & Sum(LocalTable, Score)
when the user complete the questions, and press the "Calculate" button, the final score would be displayed.
Best regards,