Can someone please help my addled brain? I’ve successfully managed to have a user create a code and assign that code a value, so ABCD24 is worth 10. I then can show a RG with the codes and their values. Separately I want anoth user to input into a field ABCD24 and then have 10 points be added to their Total score. Were I’m falling down is that I have a Data thing called Code which has the code and the value fields in it. When I create the workflow to add the value of the code to the users Total Score it’s not playing nicely. No doubt my logic is as flawed and erroneous as the last 20 years of my life.
Any help will be greeted with disco music and mirror balls! Thanks.
Hi @Tony_K, I assume that you have a field called ‘value’ on the Code data thing? You may just need to click on ‘More’ in the expression in your screenshot and add “'s value” to it.
Otherwise, you should check that your value field’s type is number and that the Total Score field on the User data thing is also a number.
OK, so first off, thank you to all who have chipped in to help, can’t tell you how much I value and appreciate your time, massive thank you.
I cracked it, as in got it to do what I want for now, and I think I understand,. I’ve basically created a state so that when you register a code and a value it creates a state called codeValue which the same as the value, then when you enter the code, it adds the result of the state to the total of the users points!!
Not sure if that will help anyone, but there you go. Cheers all.!!!
Are you specifying the parameters in your search? If you don’t specify the search parameters, Bubble will grab the first item in the list of Codes no matter what.
Inside your Do a search for Codes you should have a parameter that is something like 'code = ENTER CODE’s value".
You are actually filtering down to only one result through your search but Bubble is still seeing it as a list. The ‘:first item’ operator, in this case, is simply telling Bubble to treat the search result as a single item instead of a list.