How do you get data entered to remain visible after screen change?

Deleted

Also, I note that you are defining components such as Buttons in Pixels. Smartphones are in various sizes and screen resolutions, so what may look good on your phone may be not-so-good on others. Use percent sizing instead.

ButtonSize

ProfessorCad: Tips & Tricks GUI Layout

So, you have two choices:

  1. Keep the current Screens. On leaving a Screen save it's data to TinyDb, ready to be restored if that Screen is opened again. Edit: Actually, since you save the data in a spreadsheet, you could read the data from that when the Screen 'Form' is opened again.

  2. Change your design to use Virtual Screens - which is what Raffaele is trying to describe.

1 Like

Since you keep a strict one to one correspondence between your Form Screen textboxes and spreadsheet cells, it should be possible to reload the Form screen from the current sheet, by asking for the entire sheet, turning the Comma Separated Values (CSV) response into a table (list of lists), and load each Textbox.Text from its corresponding row and column in that table.

2 Likes

Another thing Chris - via your 'Write' button on Screen 'Form', you have a succession of Spreadsheet Cell Writes - given that the spreadsheet is in the Cloud, doing it that way is risking reliability. There is a 'FinishedWriteCell' Block which should be used.

Here is an example of how to use 'FinishedWriteCell' (Not tested!)

RankWatch_ScreenFormBlocksEdit.aia (140.0 KB)

2 Likes

This AIA doesn't work, but hopefully this will point me in the right direction..

Thanks, now I know the right name :sweat_smile:

1 Like
1 Like

That array of cell names and Textbox components would come in handy for mapping CSV table contents to the display when a full sheet arrives.

1 Like

Hi Chris (nice name by the way)

Tell me precisely what the problem is and I should be able to fix it.

Try this one - Note, only Screen 'Form' has been edited, to use FinishedWriteCell

RankWatch_ScreenFormBlocksEdit2.aia (140.1 KB)

Awesome name Chris...
I took into account what you were saying about virtual screens, and I have created the attached. but now it will not write to sheet. HELP please.
RankData.aia (132.5 KB)

You are missing a Spreadsheet Error event block and a Notifier component to announce any errors.

Drag this block into your Blocks WorkSpace, and pull in a Notifier.

If you get an error message testing, show it to us.

ABG, I did that and didn't get any notifier message. But the sheet didn't update either. I have attached my AIA for you to look at and tell me where I am going wrong.
RankData.aia (132.6 KB)

Can you post a link to your sheets, so we can see the data?

Sure can, Rank Management - Google Sheets

Try this

I see the problem.

The table of cells and components List_Data was initialized at startup, and remained blank ever afterwards, as seen in these Do It shots after loading a couple of those .Text values in the display components.


You were updating your sheet with empty values from the global variables List_Data, with its empty startup data.

What's needed here is a bit of tedium, replacing all those .Text references in List_Data with component blocks (no .anything) and using Any TextBox or Any Label generic blocks to reference the component .Text value at run time.

Since there is no block to tell you if a component is a TextBox or a Label, the app would also need two lists, LabelComponents and TextBoxComponents, filled with the corresponding components, available for IS IN LIST tests to decide which type of Any block to use on the current component.

Things are slow here, so I can start that off for you.

Here's a rework of that table of cell names and text values, where it is turned into a value procedure for immediate reevaluation of all those .Text values on request.

This helps to send all the data to the sheet, but needs extra work if you want to reverse the process and pull back data from the sheet to the Labels and TextBoxes.



The List_Data value procedure needed a little enhancement to serve two functions,

  • returning a selected item by number n, or
  • returning the total list length, if given an out of range (0) index.

RankData_ABG.aia (133.7 KB)

Proof of update:

Note that I did a bunch of component renaming to facilitate separating out Labels and Textboxes and TimePicker components into separate lists, in anticipation of two way data traffic.

Here's a start on component lists for two way traffic:


awesome, Thank you very much. I appreciate the effort you have put in and the breakdown you have supplied in helping me understand. I have to say that I have been a memeber of a number of forums trying to teach myself this and that but your guys here are absolute legends.

I will certainly be tagging you guys in the final effort. @ABG @ChrisWard

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.