Dynamic form construction using generic RPG programs (RPG)

Please mark posts as being for RPG or RDMLX (LANSA) developers.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Dynamic form construction using generic RPG programs (RPG)

Post by MarkDuignan »

Attached are two generic RPG programs named EXAM0074A and EXAM0074B.

They can be used to create any screen content dynamically. For example, this RPG code .....

// The "Order Details" list has 3 rows
EXAM0074A('T1' : 'Order Details' : 3 );
EXAM0074B('T1':1: 'Order' : '12/34678' : 'clipboard_24.png');
EXAM0074B('T1':2: 'Customer':'Fred Bloggs' : 'administrator_24.png');
EXAM0074B('T1':3: 'Ship to' : '121 Smith Street' : 'truck_24.png');

// The "Customer Details" list has 6 rows
EXAM0074A('T2' : 'Latest Customer Details' : 6 );
EXAM0074B('T2':1: 'Name' : 'Joe Bloggs & Associated' : '');
EXAM0074B('T2':2: 'Address' : '156 Lower Smith Street' : '');
EXAM0074B('T2':3:'City' : 'New York' : '');
EXAM0074B('T2':4: 'Zip' : '819282' : '');
EXAM0074B('T2':5: 'Phone' : '(614) 6373-373737': '');
EXAM0074B('T2':6: 'E-Mail' : '[email protected]': '');

// The "Customer Details" list has 9 rows

EXAM0074A('T3' : 'Other Customer Details' : 9 );
EXAM0074B('T3':1: 'Name' : 'Fred Smith' : '');
EXAM0074B('T3':2: 'Address' : '1 High Street' : '');
EXAM0074B('T3':3: 'City' : 'New England' : '');
EXAM0074B('T3':4: 'Zip' : '8d5E' : '');
EXAM0074B('T3':5: 'Phone' : '(647) 62722-6252': '');
EXAM0074B('T3':6: 'E-Mail' : '[email protected]': '');
EXAM0074B('T3':7: 'Credit Limit' : '$200,000': '');
EXAM0074B('T3':8: 'Available' : '$40,000': '');
EXAM0074B('T3':9: 'Can Sign?' : 'Yes': '');

Will produce this display on an iPhone and iPad:
screenshot.png
screenshot.png (50.94 KiB) Viewed 3325 times
Attachments
Example74.txt
(10.32 KiB) Downloaded 401 times
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Dynamic form construction using generic RPG programs (RP

Post by MarkDuignan »

This example is now shipped with LongRange.
See http://longrange.lansa.com.au/viewtopic.php?f=13&t=111
Post Reply