FILL-IN <fieldname> will not fit in FRAME cc in Program. (4028)

clawlan

New Member
I am new to progress and was just tossed into a legacy program that they wanted me to fix. I learned Java in school so forgive me if i use the wrong names for progress elements.

The program is relatively simple. It spits out a report of unauthorized users that made any transactions on a QAD (our MRP system) screen. It uses an array of usersnames to determine the authorized users, and therefore anyone that is not in the list gets included in the report.

The array is about 150 characters long, and when i change the original code from:
Code:
[COLOR=#1F497D][FONT=&quot]define variable userlst1  as character format "x(70)" init
to
[/FONT][/COLOR]
Code:
[COLOR=#1F497D][FONT=&quot]define variable userlst1  as character format "x(150)" init
[/FONT][/COLOR]

i get the aforementioned error. I know it has to do with the array length being to large, but i am not sure how to overcome this.

Thanks for any help! I have uploaded the program in a txt file as well.

View attachment zzinr0016_test.p
[FONT=&quot]
[/FONT]
 

Osborne

Active Member
If you can't increase the width of the frame from 132 to 153 then you could maybe set the variable to an editor when displaying:
Code:
"User ID: " userlst1 [COLOR=blue]VIEW-AS EDITOR SIZE 70 BY 1[/COLOR][COLOR=#000000] no-label skip(1)[/COLOR]
This would result in the data appearing similar to:
Code:
User ID:  BATCHQ,CLOCK,CMAX,DSCHLUET,DVODA,JHEPPERL,JIMM,JKIRK,JLUNA,JMAIALE,
          JSASSER,JTORRES,KHAUPT,MBC,MBOLT,MSANDERS,PFLORES,QADADM,RGALVAN,ROOT,
          SBLAIR
 

clawlan

New Member
Thank you! This got rid of that error, but the program is still not operating correctly :(

The output should be excluding those users that are defined in usrlst1, but the program appears to still only be looking at the first set of usernames and not the whole list. I know this because i move the user pflores to the front of usrlst1 and his name does not show up on the report (as expected), but if i move the name to towards the end of the list, he shows up on the report. Any ideas? I've attached the latest version of the code + output.

Thank you.

View attachment zzinr0016_test.p
View attachment 16-export-inv-aud.txt
 

Osborne

Active Member
I am not actually sure but I think you need to change:

if index(userlst1,tr_userid) = 1 then next.

to:

if index(userlst1,tr_userid) > 0 then next.

This is because if the name is first in the list the value is one, if second it it 2 and so on.
 

clawlan

New Member
I am not actually sure but I think you need to change:

if index(userlst1,tr_userid) = 1 then next.

to:

if index(userlst1,tr_userid) > 0 then next.

This is because if the name is first in the list the value is one, if second it it 2 and so on.
You sir, are a gentleman and a scholar. Thank you!
 

tamhas

ProgressTalk.com Sponsor
As part of your education, note that in ABL, a string is not an array of character. It is just a string. Array is used in ABL to refer to things defined with an EXTENT. Thus,

define variable x as character extent 10.

actually gives you 10 strings, each of which can be theoretically up to 32K, but not all at the same time.
 

mosfin

Member
in this kind of lookup, its better to use LOOKUP function
e.g:
Code:
if lookup(tr_userid,userlst1) > 0 then next.
 

sgueguen

New Member
I encountered this problem too in a display request. I solved it by adding extend format : format "x(70)".
 
Top