If anyone reading this would take a moment and tell me what I have misunderstood, I would appreciate it. In my tiny mind, the attached if statement (located in the When Screen1.Initialize block) should look for a previously stored random number and, if that number is not found, generate a random number between one and ten million. That randomly generated number should be saved back to TinyDB for future logins and displayed in my User_ID.Text label but it is not showing up. Thank you, in advance, for any eagle-eyes who can spot my error.
The purpose of this is to assign a permanent (fixed) number to each user the first time the app is opened. That random number will be used as a impersonal identifier in a data base to determine how often the app is used, as every user will have his or her unique randomly-generated identifier.
Hi, and thank you for your reply. I am not sure I have it, yet. Correction - I am sure I don't have it yet. Anything that I plug in to the global variable shows up in my text label. I am not yet generating anything but incorrect answers.
You can initialize that UserID global variable to the phrase 'I don't know my User ID yet'
When I recommend you use a constant piece of text as a tag, that recommendation applies to all cases where you will store or retrieve that piece of information.
This seems to generate a random number in the range upon downloading the app but that number is lost when the app is powered down. When I power up again, there is no new random number but the previously generated number is nowhere to be found. Does this tell me that nothing was stored?