After I study all the topics about the 'Integer' DataItem in this forum, I still cannot fully understand how to use it...
Who can provide me a tutorial for the following scenario:
1) I already create a DataItem (Customer)
2) How to use Integer DataItem to display a message ("Show message") 3 times after each record is received.
I did try to use one Iteger DataItem to do the above scenario, but it only show the message one time...
In Integer DataItem,
1) I write SETRANGE(Number,1,3); in OnPreDataItem().
2) and I write MESSAGE(Customer."No."); in OnAfterGetRecord.
Can anyone correct my code?
Thank you.
0
Comments
1. define a variable i as integer - in OnPreDataItem define i := 0;
2. In the OnAfterGetRecord-Trigger:
i += 1;
if i = 3 then begin
message ...
i := 0;
end;
Another way is:
i+= 1;
If i mod 3 = 0 then
message
I wonder know how to use Integer(Virtual Table) DataItem to show the message.
Because I wanna learn to use the Integer DataItem.
Indent Integer dataitem below customer..........
OnPredataitem (of Integer)
IF Number <= 3 THEN
Number := 1;
SETRANGE(Number,1,3);
OnAfterGet Record(of Integer)
If Number <= 3 THEN
message('Customer."No." = %1',Customer."No.");
regards,
Sophia
Add the integer dataitem indented under your other dataitem, and define the DataItemTableView as "SORTING(Number) WHERE(Number=FILTER(1..3))". Then all you need to do is add a body section for the Integer dataitem, and you are done. The only coding you would need is to change the message.
RIS Plus, LLC