Helps in cutting the code

My code as shown in the image it brings information from Firebase but I’m having a problem with the size of it and having several reissues in the code making it super heavy, the idea of it is to bring 48 information, check each message and according to change the color of function or letter depending on the number and print it in the text box. If anyone can help me my idea would be to use only a few verification actions that would be enough for the large amount of information. Thanks

What is the budget you have?

I don’t understand, there are a total of 48 identical main check blocks but they are numbered from P10 to P67 but we don’t have those that end with 8 or 9, the idea would be to reduce the size of the code as much as possible

If that is understood, the question is how much are you willing to pay for the work?

The problem is that where I am there is no way to make the transfer, it’s not even as much as I can, the issue is that there is no possibility or way in which I can make the transfer, you know?

my main problem wouldn’t even be the issue of having this huge code, it wouldn’t be because the Kodular programming page keeps crashing due to its weight, you know, in other words, the code is functional, I just wanted to reduce the size to make it less heavy, I looked for the community to See if anyone could help me with this issue

There is no need to perform repeated queries and consume resources, you can do just one and then use the dictionary.

this is a repetitive action with a couple of modified variables. use arrays or dictionaries. you can use one procedure and transfer your data to it. as a result, your number of blocks will be reduced tenfold. think about exactly how to organize the architecture of an array or dictionary.

I understand, regarding the verification of the number present in the code that changes when the background color of the textbox and the text color there is no way to do anything to reduce this issue?

I leave you a tip, I hope you learn to work on it

thanks my friend it worked with some adaptations