Ok, here is my question
I have a text box that displays a randomly generated letter, when this box is selected it will generate another letter. This works fine.
I want to create a label that will keep the original letter first shown so I can share both the original and the second randomly generated letter.
If i set the "text" to the same that's in the text box it will also change on the second box. I need it to keep the letter from first independently of what happens... Any help would be appreciated.
Hey @Courtney
You can use a variable to track this. You can set the "OnChange" property of the textinput control as:
Screen -> OnVisible -> Set(FirstLetter,"")
TextInput1 -> OnChange -> If(IsBlank(FirstLetter),Set(FirstLetter, TextInput1.Text))
You can use the variable FirstLetter and it will always retain the first generated value.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Deleted
Hi, the text that displays the letters are labels rather than text inputs. There is a formula that is already set for OnVisible that will automatically generate these letters with out having to enter any information. The second text label just needs to capture this entry but not that change once pressed.
Hey @Courtney
If they are labels and the value is calculated on Page visible, you can set this value in the FirstLetter variable there itself and use it afterwards.
Can you share more details on how this second value is generated?
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @Courtney ,
Could you share the codes for generating the letter? (OnVisible of screen and OnChange)
I am with yashag's post. You should use variable to save the original letter when it is generated at OnVisible property of screen, then set variable to Text of second label.
if you can share more codes, we can provide further assistant.
Best regards,
Sik
"There was a lot of support given with this formula so I'm not too sure how it all works at the moment but I know it works!" 😅
Here is the code for (OnHidden):
Set(randletter,First(Shuffle(Letters)).Result);Set(randletter1,First(Shuffle(Filter(Letters,Result<>randletter))).Result);Set(randletter2,First(Shuffle(Filter(Letters,Result<>randletter,Result<>randletter1))).Result);Set(randletter3,First(Shuffle(Letters)).Result)
Here is the code I for (OnVisible):
ClearCollect( Letters, Split( "ABCDEF", "" ) ); ClearCollect( Letters1, Split( "ABCDEF", "" ) ); ClearCollect( Letters2, Split( "ABCDEF", "" ) ); ClearCollect( Letters3, Split( "ABCDEF", "" ) ); UpdateContext({UpperCaseValue: ""}); Set( randletter, First(Shuffle(Letters)).Result ); Set( randletter1, First( Shuffle( Filter( Letters, Result <> randletter ) ) ).Result ); Set( randletter2, First( Shuffle( Filter( Letters, Result <> randletter, Result <> randletter1 ) ) ).Result ); Set( randletter3, First(Shuffle(Letters)).Result )
I just need 3 new labels to reflect the 3 original letters generated (OnVisible) that will not change if the original 3 are selected. The idea being that the app will submit the original letters generated along side the new letters.
When the data is submitted the process will reset and repeat.
User | Count |
---|---|
260 | |
109 | |
93 | |
57 | |
41 |