=load( local!agreements: rule!psh_getAllAgreementDetails(), local!renewingAgreements: rule!psh_getAllRenewingAgreements(), local!currentpagingInfo: a!pagingInfo(startIndex: 1, batchSize: 25, sort: a!sortInfo(field:"agreementDescription", ascending: true)), local!renewalpagingInfo: a!pagingInfo(startIndex: 1, batchSize: 25, sort: a!sortInfo(field: "agreementDescription", ascending: true)), with( local!agreementDataSubset: todatasubset(local!agreements, local!currentpagingInfo), local!data: index(local!agreementDataSubset, "data", null), local!renewDataSubset: todatasubset(local!renewingAgreements, local!renewalpagingInfo), local!renewData: index(local!renewDataSubset, "data", null), a!formLayout( label: "", firstColumnContents: { a!sectionLayout( label: "Agreements In Renewal Process", firstColumnContents: { a!gridField( totalCount: local!renewDataSubset.totalCount, columns: { a!gridTextColumn( label: "Product", field:"agreementDescription", data: index(local!renewDataSubset.data, "agreementDescription", null) ), a!gridTextColumn( label: "Renewal Status", data: index(local!renewDataSubset.data, "renewalStatus", null) ), a!gridTextColumn( label: "ITOB Approved?", data: index(local!renewDataSubset.data, "finalVote", null) ), a!gridTextColumn( label: "ITOB Approval Date", data: index(local!renewDataSubset.data, "itobdatetime", null) ), a!gridTextColumn( label: "Licensing Info", data: index(local!renewDataSubset.data, "newLicenseQty", null) ) }, value: local!renewalpagingInfo, saveInto: { a!save( local!renewalpagingInfo, if( isnull( save!value.sort ), local!renewalpagingInfo, if( length( save!value.sort.field ) <= 0, local!renewalpagingInfo, a!pagingInfo( startIndex: save!value.startIndex, batchSize: save!value.batchSize, sort: a!sortInfo( field: save!value.sort.field, ascending: save!value.sort.ascending ) ) ) ) ) } ) } ), a!sectionLayout( label: "Current Active Agreements", firstColumnContents: { a!gridField( totalCount: local!agreementDataSubset.totalCount, columns: { a!gridTextColumn( label: "Product", field:"agreementDescription", data: index(local!agreementDataSubset.data, "agreementDescription", null) ), a!gridTextColumn( label: "Vendor", data: index(local!agreementDataSubset.data, "vendorName", null) ), a!gridTextColumn( label: "Purchase Date", data: index(local!agreementDataSubset.data, "startDate", null) ), a!gridTextColumn( label: "Expiration Date", data: index(local!agreementDataSubset.data, "expiredDate", null) ), a!gridTextColumn( label: "Current Licensing Info", data: index(local!agreementDataSubset.data, "licenseQty", null) ), a!gridTextColumn( label: "Purchase Order No.", data: index(local!agreementDataSubset.data, "purchaseOrder", null) ), a!gridTextColumn( label: "RIP Number", data: index(local!agreementDataSubset.data, "ripNumber", null) ), a!gridTextColumn( label: "Technical Department", data: index(local!agreementDataSubset.data, "department", null) ) }, value: local!currentpagingInfo, saveInto: { a!save( local!currentpagingInfo, if( isnull( save!value.sort ), local!currentpagingInfo, if( length( save!value.sort.field ) <= 0, local!currentpagingInfo, a!pagingInfo( startIndex: save!value.startIndex, batchSize: save!value.batchSize, sort: a!sortInfo( field: save!value.sort.field, ascending: save!value.sort.ascending ) ) ) ) ) } ) } ), } ) ) )