Thursday, June 3, 2010

Sub Valued Level Prompting Details

How do you fixup the screen and do cross referencing and other validations when you use SUB.VALUE.PROMPTING on a SUB.MT500 screen?

Here is an example where we want to prompt for multiple file names and within each file for multiple item ids.

Instead of calling SUB.VALUE.PROMPTING directly from the SCREEN, call your subroutine which in turn will call SUB.VALUE.PROMPTING.
















Remember to add right justified fields using the PWS screen in SCREEN.BUILD if you want the count of sub-valued items to line up nicely.


You can add logic to execute only at the sub-valued level by checking X_Data_2 for the FROM.SCROLL.MAINT flag.

*

2200* Before prompt logic for Item_Attachments

*

IF INDEX(Prompt.X_Data_2, 'FROM.SCROLL.MAINT', 1) > 0 THEN

* Handle inner event from SUB.VALUE.PROMPTING execution of SCROLL.MAINT

* Reset SIP.VAL.FILE to enable cross referencing

FILE.VALUE = FIELD(Prompt.Display_Text_2, ",", 2)

FILE.LIST = MAIL.FILE.File_Attachments

CURRENT.FILE = FILE.LIST<1,FILE.VALUE>

CALL GET.DB.FILE(SIP.VAL.FILE, CURRENT.FILE)

ERROR = 0

RETURN

END

* Handle MAILBOX.ATT prompt event

GOSUB 2210;* Fixup Prompt Label with SUB.VALUE level display text

* Setup XREF stuff

Prompt.Conversions_Edits = '0X':@SVM:Prompt.Conversions_Edits

* remove compiled edits to force recompile

Prompt.Conversions_Edits = FIELD(Prompt.Conversions_Edits,roiDataMark4,1)

CALL GET.DB.FILE(SIP.VAL.FILE, CURRENT.FILE)

CALL SUB.VALUE.PROMPTING(ANSWER,SUB.DATA,P.NBR,PMT,SAVE.FN,VALUE)

END

*

RETURN

If you want to fix up details like the screen labels and prompt text while at the sub-valued level you can do this sort thing:

*

2210* Display SubValue Level Label Text

*

SET.NBR = Prompt.Scroll_Field_Type[2,2]

LOCATE SET.NBR IN SCROLL.DATA<9,1> SETTING PRIMARY.IDX ELSE RETURN

PRIMARY.PMT.NBR = SCROLL.DATA<1,PRIMARY.IDX>

PRIMARY.PMT = PID(PRIMARY.PMT.NBR)

STARTING.ROW = PRIMARY.PMT<1,7>

HEAD.ROW = STARTING.ROW-1

DISP.MASK = "L#":Prompt.Display_Length

ID.LABEL = XLATE("DICT ":CURRENT.FILE, "F0", 61, "X")

IF ID.LABEL = "" THEN ID.LABEL = "Item Id"

LABEL.TEXT = FMT(P.NBR,"2\0R"):".":VALUE:' ':ID.LABEL

Prompt.Text = "Enter ":ID.LABEL

REDIS.MISC<10> = L(HEAD.ROW):C(PMT<1,6>):LABEL.TEXT DISP.MASK

PRINT REDIS.MISC<10>:

RETURN

For Validation after prompting you can check the X_DATA_2 flag again and if you are at the multi-valued level simply request a repaint with ERROR=1000, but at the sub-valued level actually carry out input validations programmatically. Remember that your sub-valued level validation logic is being called from SCROLL.MAINT so do not use ERROR codes like 200, 1000 as you would for SUB.MT500, simply 0 or 1.

*

3200* After prompt logic for Item_Attachments

*

IF INDEX(Prompt.X_Data_2, 'FROM.SCROLL.MAINT', 1) = 0 THEN

* Remove SV Label Text

REDIS.MISC<10> = ''

ERROR = 1000

END ELSE

IF NOT(SIPDATA) THEN RETURN

FILE.VALUE = FIELD(Prompt.Display_Text_2, ",", 2)

FILE.LIST = MAIL.FILE.File_Attachments

CURRENT.FILE = FILE.LIST<1,FILE.VALUE>

REC = XLATE(CURRENT.FILE, ANSWER, -1, 'X')

IF REC = '' THEN

* Message 502: %1 item %2 not on file

CALL SCREEN.MSG(GetMessageText(502,CURRENT.FILE:@VM:ANSWER,0):";H;#M446065")

ERROR = 1

END

END

RETURN

Monday, April 26, 2010

7.3 sp1 GA Cutoff Week

Well midnight Thursday is the end of the line for 7.3 sp1 development. I've been cleaning and testing and sweeping up crumbs. My latest clean-up binge has been the DEMO.DATA. The lack of examples of web feeds has been bothering me for the last couple of years, so I bit the bullet and started creating a series of example web feeds for customers, and sales reps, and executives. It's not the end-all and be-all of demo material, but at least it will be there in the SSP account. And it has brought out a number crumbs to clean up :)

I've got one or two more bugs (legitimately called treasures if I can fix them prior to them getting to the field) to clean up before the Thursday cutoff. But I am feeling really good about the Manage-2000 7.3 release. It just has a ton of good stuff.

Wednesday, March 17, 2010

The Wonderful World of Wizards

It has been an exhilarating and somewhat exhausting spring here in Minneapolis; from 2+ feet of snow pack to clear yards and 60 degree sunshine in 2-3 weeks. Getting beta's underway has not been fast enough or clean enough for my impatient expectations. But that's why you have betas to find the stumbling blocks. While waiting to enhance as-yet unidentified pre-enhancement conditions, I have been working on a pet project to create web function wizards with more specific generation capabilities.

My first re-visitation to IWizard has resulted in a modest little wizard that will help you generate a HyperQuery web function. The HyperQuery control allows configuration of a REPORT.BUILD like query based web function.

The second undertaking turned out to be a lot more interesting and a lot more work. The BTO Inquiry Wizard allows you to select a business object, select from its available fields and generate a working inquiry with all the data access components and controls configured, and with a FormView containing single valued fields labels and textboxes, and GridView controls for each set.

The great part about wizards is, of course, that you can take the results and enhance the heck out of them. They provide RAD starts to developing your own web functions while still leaving you in total control.

Sunday, December 20, 2009

Twas The Night Before Cutoff

Twas The Night Before Cutoff

Twas the night before cutoff, when all through the house,

Not a programmer was keying, nor clicking their mouse.
The updates all filed into StarTeam with care,
In hopes that Seven_Three soon would be there.

Customers all nestled, snug in releases,
While palmtops and I-Phones sat dark in valises.
And Jimmy in his whites, and I in my cap,
Had just settled our brains for a long winter’s nap.

When out on the Net there arose such a clatter,
I sprang from my twitter to see what was the matter.
Away from my Windows I crept like a gnome,
Searched through my desktop and opened up Chrome.

The Graphic in the heading of the new-painted page
Gave mirth to results there listed by age.
When, what should appear down the page not too far,
But a Manage 2000 and 5 rating gold stars.


With data entry screens, so lively and quick,
I knew without thinking it started on PICK.
On UniData it thrives with GFE-free frames,
And whistles, and whirrs, and remembers their names

"Now Namer! now Schoolboy! now Farmboy and Widget!
On Motor Mouth! On Cheese Head! on Professor and Gidget!
To EDX, to SCREEN.BUILD, to BX REBUILD ALL

Now dot away! Dot away! Dot away all!"


The founder with his satchel all stuffed full of papers.

The performer and painter both cooking up capers.

The young black bird that had grown up so tall,

Leading us onward from the end of the hall.

As dry leaves that before the wild hurricane fly,
When they meet with an obstacle, mount to the sky.

So with hope of happy havens away they all flew,
Leaving a product full of toys, and Last Keys support too.

And then from the Palace, gave we measured lecture,
With summary and bullet of each treasured feature.
As I drew in my head, with my neck like a crane,
Down the cat-5 a new release came.

It spoke not a word, but went straight to its work,
And filled all the data, then re-painted with perk.
And laying a finger on top of my mouse,
I attached on my portal a jpg'ed house!


And then on a lark in a moment of need,

I dialed in from home to setup a Feed.

It summarized sales figures and displayed on my mobile,

It remembered my context and let me go global.


Saved out on disk, Install Shield's new folder,
Languishing there whilest the weather grows colder.
I heard it exclaim, ‘ere it shrank out of sight,
"Happy upgrade to all, and to all a good-night!"


- with inspiration from the Sniggletter

- and with apologies to Clement Clark Moore and Henry Livingston

Sunday, December 13, 2009

Whats It All About ... Alpha

The alpha test cycle of Manage 2000 release 7.3 is complete. Time to send it through the car wash and prepare for delivery to our beta sites. Lane and Alky will have a busy January getting a clean release ready for Tina, Mark, and Mike. I have to bite my development tongue and stop trying to sneak one more feature into the web tools. Time to get busy on the component and control documentation and the web course-ware instead, to catch it up to the VS2008 world.

Can't stop thinking about the impact of all the development work from over the past two years for Manage 2000 sites going to 7.3.

Friday, November 27, 2009

Sprinting To The 7.3 Finish Line

Funny things happen when you present your work to others. Brain cells fire about what you wish you had done in addition to what you did actually accomplish. I had just finished talking about the web last keys enhancements and was getting ready to talk about web feeds when some severely neglected axons and dendrites conspired to revolt, or in this case maybe just volt, and then it occurred to me...

So, what if you put up the Manage 2000 7.3 site as an externally facing portal. And what if the portals supported attachments. Customers could attach documents to sales orders, or vendors could attach documents to purchase orders and internal users could interact with the attachments from the internal portals, or in fact from PWS functions.

I was not thinking I could sneak this in before Beta, but as of Wed. morning I have been merrily attaching objects via portals on our development box. And more importantly (as Jim often reminds me) it's cute.

Wednesday, October 7, 2009

Summer's End 2009

Perspectives session material was due in last Friday. Now I can get back to building new stuff. I still haven't finished the display panel memory. It is a small annoyance, but a general client side context persistence mechanism will come handy over and over.

There also remains some fleshing out of the metadata implementation. In particular being able to set an M2k edit pattern and have a Regex generated and applied to the input would be sweet. I'd also like to get any existing pattern matching or required validators to be automatically tied in...December is rapidly approaching, we'll see what we can sneak in. The performance exception logging and user preference extensions are a must, so I guess I better start on those directly.

I just put in a replacement for the dorky alerts with which I was displaying ?3 and ?5 help. Now we have a nifty m2kShowMessage(hmtlMsg) js function with which it is easy to compose an HTML display and pop it up using an in-line div that won't set off the pop-up blockers.