Application Works Differently on Fat Client than Portal

Pat_H

Active Member
I'm working on a custom application. I want to display a grid row (all columns) in yellow if the employee is an hourly employee. I use the following logic to perform this:

If Va frm_cPayTyeHSP_SALY is equal to "H"
Set Grid Color(FC Grid, <Currenly Selected Row>, <All Columns>, <Yellow>)
Else
Set Grid Color(FC Grid, <Currenly Selected Row>, <All Columns>, <Default>)
End If
The logic is working on my fat client but not on the Portal. It's not setting the color to yellow on every row that should be, just a few of them. Not sure why it works on some lines and not others, when it's working on all of them on the Fat client. I'm working in XE so we don't have web development, I do have debug turned on the JAS server and can look at the jasdebug.log but nothing in there is popping out at me as a potential error. Does anyone know if this should be working on the portal? Is there a rule that you have to get the color as the last thing you do before inserting the grid buffer row (because I'm not)? I can't find any documentation on this command and the rules associated with it. Does anyone have any ideas for me to try? Thanks in advance. - Pat
 
Pat, where does the SALY variable get its value, and where are you changing the row's colour? Please specify both Object & Event.
 
Hello Adrian, I'm retrieving the SALY value from the the employee master file with a fetch. I'm changing the rows color in the Grid Record is Fetched event just prior to inserting the grid record:
Insert Grid Buffer Row(FC Grid, <After Last Row>, <Yes>, <No>, <Yes>, <Yes>, <Yes>)
I don't believe it's a case of my IF/THEN/ELSE condition failing due to SALY not containing the correct value due to the fact that it's working propery on my FAT client. I've not had to run applications much on the portal in the past so I'm wondering if it's a "color" thing with the portal. Maybe the two don't mix, maybe there are certain functions that work on a client server environment but not on the portal.
 
Hi Pat,

First of all, I am not experienced running APPLs on portal, but suppose, some things can work differently sometimes.

On the other hand, your scenario is not clear enough, at least for me.
First some question:
Q1. Does your Form running on a BSVW?
Q2. Do you Suppress to write the original BSVW records to write into Grid?
Q3. OR do you insert extra grid rows into the grid and let you write the original BSVW records into Grid?

My suggestions depends on your replies, but currently here is 2 suggestion:

S1. Set the color after the insertation.
And/Or
S2. If you retrieve SALY variable in your Fetch with "GC Employee Number", then change it to "BC Employee Number".

Read you later & Regards,

Zoltán
 
Hello Zoltan, thank you for replying. The form works on a BSVW over the time entry Z1 file. An employee can have several records per PPED and I have to read them all, accumulate the totals hours then insert the grid line with that employee's total hrs when the employee number changes or last record is read. Since I want a total per employee I have to suppress each record read in the BSVW until the emp# changes. I'm debugging the code and playing around with it to see if can fix it. I think I may be setting the color on to soon. Maybe when I'm suppressing a grid line it blows away the grid color (just a theory). I have a question on your first suggestion to set the color AFTER insertion. How does that work? Wouldn't it be too late, I was under the impression that the insert added the line to the grid and that was it, wouldn't setting the color AFTER insertion be for the next inserted record?
 
I solved my issue. I had to more the code where I checked for the condition and set the grid row color on immediately before I inserted the row. I still have no idea why the app was working in the client server environment and not the portal. Thanks for all the suggestions.
 
Hi Pat,

[ QUOTE ]
I have a question on your first suggestion to set the color AFTER insertion. How does that work? Wouldn't it be too late, I was under the impression that the insert added the line to the grid and that was it, wouldn't setting the color AFTER insertion be for the next inserted record?

[/ QUOTE ]

Why don't you try it to get the answers?
At least on the fat client - you can do it quickly.
To make the try is not too late
cool.gif
and I am eager to know your result
cool.gif


Regards,

Zoltán
 
It didn't work. The "test" set the grid color for the next record inserted not the intended record. Exactally what I thought it would do.
wink.gif
 
Back
Top