ScreenIO - tabbed screens

Discussion about software products provided for the BR community and created by its members. This includes (but is not limited to): MyEdit, File IO, Screen IO, FNSnap, and Utilities written in other languages for use with Business Rules.

Moderators: Susan Smith, admin, Gabriel

Susan Smith
Posts: 708
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

ScreenIO - tabbed screens

Postby Susan Smith » Thu Jun 23, 2016 11:16 am

Hi all,

I know that some of you are using tabbed screens with ScreenIO (Steve and Gabriel, at least). I am going to put together a really big program that ties a lot of screens together. SOME of them are update screens that represent different sections of ONE SINGLE data file record. Others do things like look-ups on customer history, issuing documents, and create/update records in other files, but they are all keyed by one customer account number.

Assume that screens (tabs) #1, #2 and #3 each operate on different parts of the same data record. When I click on each tab, is it better to open/read/save the record inside of each tab before moving to the next? What if I want to keep all of the fields "open" across the tabs and then have the SAVE button on only the first screen? Would I have to pass the data back and forth across the tabs using Mat MYF$ and Mat MYF? How do you keep track of whether changes are made (or not) in screen #2 or #3 when you go back to screen #1 where the SAVE button is? Or do you not reread the record for each tab at all? And to make it more complicated, on the first screen is a status section that in part, summarizes some of the data on the later screens. For instance, if someone is in bankruptcy, all of that information might be in screen #3, but on screen #1, there is a notification "Bankruptcy" so that the user can quickly tell.

I know that a separate open/read/save on each tab is probably easier, but if I'm working on a brand new customer and someone saves screen #2 (with only secondary data on it) and then exits without saving screen #1 where the customer number and name are supposed to be entered, I would be in trouble. I'm confused how to navigate tabbed screens when they are all parts of the same record. There are too many fields to fit easily on one screen so I'm trying to break it up logically.

Any hints would be welcome. Thanks.

-- Susan

Gabriel
Posts: 389
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: ScreenIO - tabbed screens

Postby Gabriel » Thu Jun 23, 2016 11:29 am

You are correct in thinking to use Mat MyF$ and Mat MyF to pass the data back and forth, and then save it in your calling routine only when they're ready to exit all the tabs at once.

However, the good news is the run.br library that comes with ScreenIO has a function called fnRunTabs that helps for running tabs made of screenio screens.

All you have to do is pass the fnRunTabs function 2 arrays - one of descriptions to put on the tabs themselves, and the other of Screen Names to load and display in each tab. By default it will do the saving and loading inside each screen which is ideal if each tab represents a different and unrelated data file. However, you can pass the optional parameter of File Layout, and if thats passed, then fnRunTabs will automatically use Mat MyF$ and Mat MyF for you, and automatically save it when they exit all tabs (only if they click "Yes" to the Do You want to Save? Message box).

So that will do most of the work for you.

The tricky part for you will be, in this specific case you want to show several edit screens (where you DO want to pass in Mat MyF$ and Mat MyF) but you also want to show other screens from other data files (where you wouldn't pass in MyF$ and MyF but instead would only want to pass in the key.) FnRunTabs doesn't handle it both ways at the same time - you have to choose one or the other. So, depending on how it goes, you may end up having to make your own loop of BR code to print the tabs and do the input the way you want.

The good news is, ScreenIO Screens are ideal for putting on tabs, no matter how you do the tabs, whether with a function, or with traditional BR code.

Start by making each of your screens the way you want. And when they're all designed and you're ready to put them together on tabs, if you have any further questions, either write here, or call me, or find me on google chat, and i'll help you get it all working.

Gabriel

Susan Smith
Posts: 708
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Re: ScreenIO - tabbed screens

Postby Susan Smith » Thu Jun 23, 2016 11:49 am

Thank you Gabe! I was looking at fnruntabs before, but the part I wasn't getting was that I can't mix and match the ways in which the screens work together (either all related using Mat MyF$ or not, I mean). Now that I know this, I think I can proceed in a more logical way. It might make sense to put the non-related screens on buttons somewhere in the tabbed screens where it can just "chain out" to that function as a sort of subroutine from one of the tabbed screens, rather than put those kinds of screens on tabs themselves using fnruntabs. Then all of the ACTUAL tabs can continue to be related to the add/edit record. This is great. Thanks for pointing me in the right direction. I think I'm getting somewhere now.

-- Susan

Gabriel
Posts: 389
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: ScreenIO - tabbed screens

Postby Gabriel » Thu Jun 23, 2016 11:51 am

Yes, if you put the other related screens on buttons and only put the add/edit stuff on the tabs, then you can use fnRunTabs to do everything for you, which is probably a lot easier.

If you want to mix and match both types of Screens on your tabs you'll have to make your own tabs function loop, which isn't that hard, but it is still not as easy as fnRunTabs.

gabriel

Susan Smith
Posts: 708
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Re: ScreenIO - tabbed screens

Postby Susan Smith » Thu Jun 23, 2016 12:09 pm

That's great. We have a plan. :D

-- Susan


Return to “3rd Party Software from the BR Community”

Who is online

Users browsing this forum: No registered users and 0 guests

cron