cancel
Showing results for 
Search instead for 
Did you mean: 

how to create list based on text argument from another screen

JPabl.1
Senior

Hi there Touchgfx team!

 

I've these screen requirements

JPabl1_0-1729111004155.png JPabl1_1-1729111014630.png 

JPabl1_2-1729111078577.png

The user can select a test in the "test selection screen". Based on that selection, a "calibrate screen" will be created with different steps as you can see in the 3 images. I've mora than 30 test options and a set of different steps for each one. 

How can I do this? I want to avoid the scenario of creating 30 different screens for each test. Is there a way to send the test option selected to the "calibrate screen", and based on that create the list of steps? 

Thanks a lot in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @JPabl.1,

You can create one screen for the "Calibrate Screen", and then set it up based on the test that has been selected. You can do that by transmitting the required settings between the screens. If you need to send a lot of data, then it would be better to send a flag or enum as you mentioned instead, and set the screen based on that. 

The advantage of sending data is that you won't need to check any flags, and you just display the received data, but if there is too much data for transmission, then sending a flag is a cleaner method. 

let me know if you have more questions! 

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

2 REPLIES 2
JPabl.1
Senior

I can think of: 

1. I can create a enum for all the options. 

2. Once the user selects an option, a flag is updated with the corresponding enum value. 

3. On the "calibrate screen" setup function, this flag is checked to create the different version of the list. 

 

Is that the correct way to do it or there's a better way? Thanks!

Hello @JPabl.1,

You can create one screen for the "Calibrate Screen", and then set it up based on the test that has been selected. You can do that by transmitting the required settings between the screens. If you need to send a lot of data, then it would be better to send a flag or enum as you mentioned instead, and set the screen based on that. 

The advantage of sending data is that you won't need to check any flags, and you just display the received data, but if there is too much data for transmission, then sending a flag is a cleaner method. 

let me know if you have more questions! 

Mohammad MORADI
ST Software Developer | TouchGFX