首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >AS/400上的GeneXus网格负载问题

AS/400上的GeneXus网格负载问题
EN

Stack Overflow用户
提问于 2018-05-31 22:21:12
回答 1查看 139关注 0票数 0

我正在使用GeneXus X演进3-版本10.3.98441 U5

我正在为AS/400平台编译RPG。

我的挑战是,当我在工作面板中加载网格时,我需要过滤出具有特定状态值的记录。我终于让我的程序过滤掉了不需要的记录,但现在它只显示最后一个有效的记录。这是一个常见的问题吗?或者是别人以前遇到过的东西?

这是我的工作面板中的事件代码。

代码语言:javascript
复制
Event Load
for each 
    where RecordStatus = 'ACT'
        &nUserId = nullValue(&nUserId) // clear the note author variable
        &nDate   = nullValue(&nDate)   // clear the date the note was created
        if RecordNoteLine = 1 // only put printable values on the first line
            &nDate = DtoC(RecordDate)
            call(Prog0364, RecordWho, &nUserId) // get userID from emp no
        endif
        &noteUserId = &nUserId 
        &noteDate   = &nDate
        &noteText   = RecordNotes
        MyGrid.Load()
endfor
Endevent

将用户ID和日期设为空的目的是仅在记录显示的第一行显示用户ID和日期(作为字符字段)。此块的用途是仅显示活动记录。项目要求使用软删除('DEL‘状态),并且只显示活动记录。

我对使用GeneXus、RPG和在任何大型机平台上进行开发都是非常陌生的,所以任何帮助都将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-06-01 04:22:45

通过一些“玩弄”和测试各种结果,我得出了以下结论( the ?)我的问题的解决方案:

代码语言:javascript
复制
Event Load
for each 
    where RecordStatus = 'ACT'
        &nUserId = nullValue(&nUserId) // clear the note author variable
        &nDate   = nullValue(&nDate)   // clear the date the note was created
        if RecordNoteLine = 1 // only put printable values on the first line
            &nDate = DtoC(RecordDate)
            call(Prog0364, RecordWho, &nUserId) // get userID from emp no
        endif
        &noteUserId = &nUserId 
        &noteDate   = &nDate
        &noteText   = RecordNotes
        Load  // <--- THIS is key and obviously I misunderstood when told to use a "load"
              // I was ignorant of what that was, so I looked it up and found 
              // the original code that didn't work for me.
endfor
Endevent
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50626556

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档