I'm stuck trying to create an app that references a database of what people prefer out of two random options

Hi @ioannis . Thanks once more for your help. This response is a bit lengthy, but wanted to explain the behaviours as I’m seeing now. (This is from starting with no existing records in the Combinations1 table):

When screen 1 opens:

  • Everything looks OK
  • I get a random item for Option A and a random item for Option B appearing as text in the OptionA and OptionB buttons

When I click OptionA button:

  • The table in Combinations1 updates correctly - a record is created with the correct OptionA and Option B and 1 is added to the VotesForA field, and the PercentA and PercentB fields update
  • The labels do not update - the label text should be appearing now as the text in the PercentA (100) and PercentB (0) fields, but nothing is displayed

Click Option A again (same 2 options on screen as before)

  • The table updates correctly i.e. VotesForA updates to “2”
  • The labels update correctly too - LabelA text shows as 100 and LabelB text shows as 0

If I click Option A button again (still same 2 options as before)

  • Nothing happens - table record does not update

Click Option B (same 2 options as before still on screen)

  • Table updates correctly - 1 added to VotesForB, PercentA and PercentB fields also update
  • Label text does not change (it should change to the new PercentA and PercentB values)

If I click Option B again (same 2 options as before)

  • Nothings happens - table fields do not update

If I now click “Another”

  • Gets 2 new random items for Option A and Option B as it should, and shows these as the text in the OptionA and OptionB buttons
  • The label text stays on screen from the time before I pressed “Another”. I would want this to reset when “Another” is clicked

Click Option A button

  • Table updates correctly - two new items are added in a new row and the VotesForA field updates to “1”
  • The label texts disappear where I want them to now show the PercentA and PercentB values for the new row

Click Option B button (same 2 options)

  • Table updates correctly, so now shows VotesForA=1, VotesForB=1, PercentA=50, PercentB=50
  • Label texts also update correctly - shows LabelA text as 50 and LabelB text as 50

Click Option A again (same items)

  • Table updates OK - VotesForA=2, VotesForB=1, PercentA=67, PercentB=33
  • Labels on screen do not update though

Click “Another” and get 2 options that are already an existing combination in the Combinations1 source

Click Option A

  • Nothing happens - no records update

Click Option B

  • Table updates OK - correct existing records update

Try clicking Option A again

  • Creates a new entry in table with a different (incorrect) Option A but the correct Option B - it should not create a new record line at all as the combination already exists

Click Option B

  • Table updates correct Option B but wrong Option A existing combination

Click Option B again

  • Updates table with new record containing both wrong Option A and wrong Option B

Here are the blocks that I’m using with the behaviours described in the previous message

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.