Purchase orders and complete position dossier — Pro
Date/company selection, original supplier/shipping records and native amounts; lazy positions with quantities, units, costs, schedules and project/account context.
UNOFFICIAL — NOT VALIDATED ON A REAL ERP INSTALLATION.
For purchasing, receiving, accounts payable and project teams: choose a purchase-order date period and company, find an order and inspect the original supplier, contacts and addresses, buyer, native amounts, shipping destination and blanket/receipt context. Open Purchase positions only when needed: goods, services, description/freight lines, separate quantities and native costs, units, promised/required dates, accounts, project/task and original position shipping destinations.
Why Cifru? Adapt configurations to the way you work. Choose the fields, filters and details you need, and bring information to your phone that may not be available in your business software’s own mobile app. Available options depend on the data exposed by your authorized source and your Cifru plan.
Pro: one SQL source, one Home button, two lists and one lazy related button. 51 order and 49 position values in grouped Details, eight fields per card; hidden technical identity/context, Search, native period and company opening filters. Live lists cap at 1,000 rows each, no automatic refresh or all-line preload. Identity checks can scan beyond the visible cap; not complete-company totals or measured performance.
Own pinned Microsoft registrations and migration code document PurchOrd/PurOrdDet and PONbr binding. AL logical keys are order number and order number+position reference, not an invented company/type triple. Reused order numbers across companies are ambiguous and reject the root. Company consistency is checked additionally; invalid/duplicate references or wrong-company positions block only their own order. All 49 selected original order values are revalidated before positions load. No first match, silent dedup or unscoped PONbr-only child access. AL declarations do not certify installed SQL owner/DDL/PK/FK.
Original order supplier and shipping records stay separate from the original position destination; no current Vendor/Inventory substitution. POType, status, open flags and receipt/voucher stages remain raw source values, not payment/posting/eligibility promises. Documented PurchaseType meanings are shown as migration context; unknown codes remain unmapped. Not restricted to migration-eligible open regular orders, and not every position is a product.
QtyOrd/QtyRcvd/QtyReturned/QtyVouched and PurchUnit are separate stored values. No ordered-minus-received, unit conversion or availability formula. Header Cury-prefixed amounts retain header CuryID; positions retain their own CuryID and native Cury-prefixed costs, with parent code shown separately. Missing or different currency/type codes are displayed explicitly, never silently inherited or converted. No ISO guarantee, tax/payment balance, FX, signed total, aggregation or quantity-times-cost calculation. NULL, zero and negative values remain original. Opening period is PODate, not posting/receipt or line dates.
Documentary and adapted synthetic/native DEMO validation only. No real Dynamics SL, SQL Server, iOS, installed DDL/storage/index/query plan/release, ERP ACL or compatibility/performance certified. Verify the proposed dbo owner and authorised SL business database during import/read test; not a Business Central migration destination. Company filters and hidden keys are not access control: direct SQL does not inherit ERP permissions. Require a separately administrator-scoped SELECT-only reporting login; do not copy migration sysadmin/db_owner instructions or execute migration writes.
No source credentials, host, passwords, bank, audit/user, custom/future or technical row-ID columns. Business contacts and commercial amounts can still be confidential. Screenshots are wholly fictional DEMO, not a real ERP installation. Eight public images are representative, not all possible rows or every Detail position; complete native overlap evidence is retained locally. Unofficial, not Microsoft endorsed. Distinct legacy installed-base SL with July 2028 extended-support boundary, not a current top-three or no-mobile claim.
Source registration: https://github.com/microsoft/ALAppExtensions/blob/e7ed235bc979c0283306e9639ff7cd22ce78341d/Apps/W1/HybridSL/app/src/codeunits/SLHybridWizard.Codeunit.al
Order fields: https://github.com/microsoft/ALAppExtensions/blob/e7ed235bc979c0283306e9639ff7cd22ce78341d/Apps/W1/HybridSL/app/src/Migration/PuchaseOrders/SLPurchOrdBuffer.Table.al
Position fields: https://github.com/microsoft/ALAppExtensions/blob/e7ed235bc979c0283306e9639ff7cd22ce78341d/Apps/W1/HybridSL/app/src/Migration/PuchaseOrders/SLPurOrdDetBuffer.Table.al
Explicit order binding and purchase types: https://github.com/microsoft/ALAppExtensions/blob/e7ed235bc979c0283306e9639ff7cd22ce78341d/Apps/W1/HybridSL/app/src/Migration/PuchaseOrders/SLPOMigrator.Codeunit.al
Screenshots
What this package creates
- Home: Purchase orders
- Details: Purchase positions
- Sub-button: Purchase positions
Sources are mapped locally and verified before applying.
Custom queriesPRO2 SQL
Custom queries are a PRO feature. Cifru repeats read-only validation against the local source before execution.
$.components.workspaceSelection.datasets.0.sqlQuerySELECT RTRIM(CAST(m.PONbr AS nvarchar(max))) AS PONbr,RTRIM(CAST(m.CpnyID AS nvarchar(max))) AS CpnyID,m.PODate AS PODate,m.POType AS POType,m.Status AS Status,m.OpenPO AS OpenPO,m.Buyer AS Buyer,m.BuyerEmail AS BuyerEmail,m.ConfirmTo AS ConfirmTo,m.ReqNbr AS ReqNbr,m.Terms AS Terms,m.ProjectID AS ProjectID,m.CuryID AS CuryID,m.CuryPOAmt AS CuryPOAmt,m.CuryPOItemTotal AS CuryPOItemTotal,m.CuryFreight AS CuryFreight,m.CuryRcptTotAmt AS CuryRcptTotAmt,m.VendID AS VendID,m.VendName AS VendName,m.VendAttn AS VendAttn,m.VendPhone AS VendPhone,m.VendEmail AS VendEmail,m.VendAddrID AS VendAddrID,m.VendAddr1 AS VendAddr1,m.VendAddr2 AS VendAddr2,m.VendCity AS VendCity,m.VendState AS VendState,m.VendZip AS VendZip,m.VendCountry AS VendCountry,m.ShipName AS ShipName,m.ShipAttn AS ShipAttn,m.ShipPhone AS ShipPhone,m.ShipEmail AS ShipEmail,m.ShipAddr1 AS ShipAddr1,m.ShipAddr2 AS ShipAddr2,m.ShipCity AS ShipCity,m.ShipState AS ShipState,m.ShipZip AS ShipZip,m.ShipCountry AS ShipCountry,m.ShipSiteID AS ShipSiteID,m.ShipVia AS ShipVia,m.ShiptoType AS ShiptoType,m.ShiptoID AS ShiptoID,m.FOB AS FOB,m.LastRcptDate AS LastRcptDate,m.RcptStage AS RcptStage,m.VouchStage AS VouchStage,m.BlktPONbr AS BlktPONbr,m.BlktExprDate AS BlktExprDate,CONCAT(CASE WHEN RTRIM(CAST(m.PONbr AS nvarchar(max))) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(RTRIM(CAST(m.PONbr AS nvarchar(max))) AS nvarchar(max))),N':',CAST(RTRIM(CAST(m.PONbr AS nvarchar(max))) AS nvarchar(max)),N';') END) AS PurchaseKey,CONCAT(CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max)),N';') END) AS PurchaseContext,CASE WHEN NOT (NOT EXISTS (SELECT 1 FROM dbo.PurOrdDet bad WHERE (RTRIM(CAST(bad.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.PONbr AS nvarchar(max))))) AND ((bad.PONbr IS NULL OR RTRIM(CAST(bad.PONbr AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))>20) OR (bad.LineRef IS NULL OR RTRIM(CAST(bad.LineRef AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.LineRef AS nvarchar(max))))>10) OR (bad.CpnyID IS NULL OR RTRIM(CAST(bad.CpnyID AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))>20) OR NOT (RTRIM(CAST(bad.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.CpnyID AS nvarchar(max))))))) AND NOT EXISTS (SELECT 1 FROM dbo.PurOrdDet bad WHERE (RTRIM(CAST(bad.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.PONbr AS nvarchar(max))))) GROUP BY CAST(RTRIM(CAST(bad.LineRef AS nvarchar(max))) AS nvarchar(5)) COLLATE Latin1_General_100_BIN2,DATALENGTH(RTRIM(CAST(bad.LineRef AS nvarchar(max)))) HAVING COUNT(1)<>1)) THEN N'Ambiguous / invalid position identity or company' WHEN EXISTS (SELECT 1 FROM dbo.PurOrdDet a WHERE (RTRIM(CAST(a.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.PONbr AS nvarchar(max)))))) THEN N'Available on demand' ELSE N'No stored positions' END AS LineAvailability,N'Original purchase order, not an invoice, current supplier or paid balance' AS OrderScope FROM dbo.PurchOrd m WHERE NOT EXISTS (SELECT 1 FROM dbo.PurchOrd bad WHERE (bad.PONbr IS NULL OR RTRIM(CAST(bad.PONbr AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))>20) OR (bad.CpnyID IS NULL OR RTRIM(CAST(bad.CpnyID AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))>20)) AND NOT EXISTS (SELECT 1 FROM dbo.PurchOrd bad GROUP BY CAST(RTRIM(CAST(bad.PONbr AS nvarchar(max))) AS nvarchar(10)) COLLATE Latin1_General_100_BIN2,DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max)))) HAVING COUNT(1)<>1)
static read-only checks passed
$.components.workspaceSelection.datasets.1.sqlQuerySELECT RTRIM(CAST(a.PONbr AS nvarchar(max))) AS PONbr,RTRIM(CAST(a.LineRef AS nvarchar(max))) AS LineRef,RTRIM(CAST(a.CpnyID AS nvarchar(max))) AS CpnyID,a.POType AS POType,a.LineNbr AS LineNbr,a.InvtID AS InvtID,a.TranDesc AS TranDesc,a.PurchaseType AS PurchaseType,a.QtyOrd AS QtyOrd,a.QtyRcvd AS QtyRcvd,a.QtyReturned AS QtyReturned,a.QtyVouched AS QtyVouched,a.PurchUnit AS PurchUnit,a.CuryID AS CuryID,a.CuryUnitCost AS CuryUnitCost,a.CuryExtCost AS CuryExtCost,a.CuryCostReceived AS CuryCostReceived,a.CuryCostReturned AS CuryCostReturned,a.CuryCostVouched AS CuryCostVouched,a.SiteID AS SiteID,a.ReqdDate AS ReqdDate,a.PromDate AS PromDate,a.OpenLine AS OpenLine,a.RcptStage AS RcptStage,a.VouchStage AS VouchStage,a.PurAcct AS PurAcct,a.PurSub AS PurSub,a.ProjectID AS ProjectID,a.TaskID AS TaskID,a.ReqNbr AS ReqNbr,a.SOOrdNbr AS SOOrdNbr,a.SOLineRef AS SOLineRef,a.AlternateID AS AlternateID,a.AltIDType AS AltIDType,a.ShipName AS ShipName,a.ShipAddr1 AS ShipAddr1,a.ShipAddr2 AS ShipAddr2,a.ShipCity AS ShipCity,a.ShipState AS ShipState,a.ShipZip AS ShipZip,a.ShipCountry AS ShipCountry,a.ShipViaID AS ShipViaID,CONCAT(CASE WHEN RTRIM(CAST(a.PONbr AS nvarchar(max))) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(RTRIM(CAST(a.PONbr AS nvarchar(max))) AS nvarchar(max))),N':',CAST(RTRIM(CAST(a.PONbr AS nvarchar(max))) AS nvarchar(max)),N';') END,CASE WHEN RTRIM(CAST(a.LineRef AS nvarchar(max))) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(RTRIM(CAST(a.LineRef AS nvarchar(max))) AS nvarchar(max))),N':',CAST(RTRIM(CAST(a.LineRef AS nvarchar(max))) AS nvarchar(max)),N';') END) AS PositionKey,CONCAT(CASE WHEN RTRIM(CAST(a.PONbr AS nvarchar(max))) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(RTRIM(CAST(a.PONbr AS nvarchar(max))) AS nvarchar(max))),N':',CAST(RTRIM(CAST(a.PONbr AS nvarchar(max))) AS nvarchar(max)),N';') END) AS PurchaseKey,:purchaseContext AS PurchaseContext,m.CuryID AS ParentCurrency,m.VendID AS ParentSupplier,m.POType AS ParentOrderType,CASE WHEN a.POType IS NULL OR m.POType IS NULL OR RTRIM(CAST(a.POType AS nvarchar(max)))=N'' OR RTRIM(CAST(m.POType AS nvarchar(max)))=N'' THEN N'Missing type code; unverified' WHEN (RTRIM(CAST(a.POType AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.POType AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.POType AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.POType AS nvarchar(max))))) THEN N'Source type codes agree' ELSE N'Source type codes differ' END AS TypeContext,CASE WHEN a.CuryID IS NULL OR m.CuryID IS NULL OR RTRIM(CAST(a.CuryID AS nvarchar(max)))=N'' OR RTRIM(CAST(m.CuryID AS nvarchar(max)))=N'' THEN N'Missing currency code; unverified' WHEN (RTRIM(CAST(a.CuryID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.CuryID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.CuryID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.CuryID AS nvarchar(max))))) THEN N'Source currency codes agree' ELSE N'Source currency codes differ; no conversion' END AS CurrencyContext,CASE RTRIM(CAST(a.PurchaseType AS nvarchar(max))) WHEN N'DL' THEN N'Description line' WHEN N'FR' THEN N'Freight charges' WHEN N'MI' THEN N'Miscellaneous charges' WHEN N'GI' THEN N'Goods for inventory' WHEN N'GS' THEN N'Goods for sales order' WHEN N'GP' THEN N'Goods for project' WHEN N'PI' THEN N'Goods for project inventory' WHEN N'PS' THEN N'Goods for project sales order' WHEN N'GN' THEN N'Goods for non-inventory' WHEN N'SE' THEN N'Services for expense' WHEN N'SP' THEN N'Services for project' ELSE N'Unmapped source code' END AS PurchaseTypeMeaning,N'Original position and its own currency values; no outstanding, paid or converted total' AS LineScope FROM dbo.PurOrdDet a INNER JOIN dbo.PurchOrd m ON (RTRIM(CAST(m.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(a.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(m.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(a.PONbr AS nvarchar(max))))) AND (RTRIM(CAST(m.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(a.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(m.CpnyID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(a.CpnyID AS nvarchar(max))))) WHERE (RTRIM(CAST(a.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:purchase AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:purchase AS nvarchar(max))))) AND (RTRIM(CAST(a.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:company AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.CpnyID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:company AS nvarchar(max))))) AND NOT EXISTS (SELECT 1 FROM dbo.PurchOrd bad WHERE (bad.PONbr IS NULL OR RTRIM(CAST(bad.PONbr AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))>20) OR (bad.CpnyID IS NULL OR RTRIM(CAST(bad.CpnyID AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))>20)) AND NOT EXISTS (SELECT 1 FROM dbo.PurchOrd bad GROUP BY CAST(RTRIM(CAST(bad.PONbr AS nvarchar(max))) AS nvarchar(10)) COLLATE Latin1_General_100_BIN2,DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max)))) HAVING COUNT(1)<>1) AND NOT EXISTS (SELECT 1 FROM dbo.PurOrdDet bad WHERE (RTRIM(CAST(bad.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:purchase AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:purchase AS nvarchar(max))))) AND ((bad.PONbr IS NULL OR RTRIM(CAST(bad.PONbr AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))>20) OR (bad.LineRef IS NULL OR RTRIM(CAST(bad.LineRef AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.LineRef AS nvarchar(max))))>10) OR (bad.CpnyID IS NULL OR RTRIM(CAST(bad.CpnyID AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))>20) OR NOT (RTRIM(CAST(bad.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:company AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:company AS nvarchar(max))))))) AND NOT EXISTS (SELECT 1 FROM dbo.PurOrdDet bad WHERE (RTRIM(CAST(bad.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:purchase AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:purchase AS nvarchar(max))))) GROUP BY CAST(RTRIM(CAST(bad.LineRef AS nvarchar(max))) AS nvarchar(5)) COLLATE Latin1_General_100_BIN2,DATALENGTH(RTRIM(CAST(bad.LineRef AS nvarchar(max)))) HAVING COUNT(1)<>1) AND (CONCAT(CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max)),N';') END) COLLATE Latin1_General_100_BIN2=:purchaseContext COLLATE Latin1_General_100_BIN2 AND DATALENGTH(CONCAT(CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max)),N';') END))=DATALENGTH(:purchaseContext))
static read-only checks passed
View the JSON being importedcollapsed by default
{
"components": {
"sourceSlots": [
{
"displayName": "Dynamics SL — authorised SQL business database",
"id": "AB64FF01-394A-5304-B406-22E6691D5760",
"kind": "sqlServer",
"requiredObjects": [
"dbo.PurchOrd",
"dbo.PurOrdDet"
],
"requiresCustomSQL": false
}
],
"workspaceSelection": {
"commonFields": [],
"datasets": [
{
"cacheMode": "live",
"calculatedFields": [],
"customQueryIntegrationName": "",
"endpointPath": "",
"fetchSortRules": [
{
"direction": "descending",
"id": "27AE8C95-174F-5108-8F94-0E503009BFF2",
"key": "PODate",
"type": "date"
},
{
"direction": "ascending",
"id": "D9D3F2E5-5862-5CBA-B44B-A8BD2A342F44",
"key": "PONbr",
"type": "text"
},
{
"direction": "ascending",
"id": "2091E240-8C02-5A24-B572-2997A5AC0BBD",
"key": "PurchaseKey",
"type": "text"
}
],
"id": "0E82EAAE-19B1-50ED-BA05-3657CA5948BA",
"mappings": [
{
"commonFieldKey": "",
"key": "PurchaseKey",
"label": "Internal complete purchase context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PurchaseKey",
"type": "text",
"visibleInDetail": false,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PurchaseContext",
"label": "Internal complete purchase context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PurchaseContext",
"type": "text",
"visibleInDetail": false,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PONbr",
"label": "Purchase order number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PONbr",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "CpnyID",
"label": "Stored company code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CpnyID",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "PODate",
"label": "Stored order date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PODate",
"type": "date",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "POType",
"label": "Stored order type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "POType",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "Status",
"label": "Stored order status code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "Status",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "OpenPO",
"label": "Stored open-order flag",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "OpenPO",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "Buyer",
"label": "Buyer business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "Buyer",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "BuyerEmail",
"label": "Buyer email on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "BuyerEmail",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ConfirmTo",
"label": "Order confirmation code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ConfirmTo",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ReqNbr",
"label": "Requisition number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ReqNbr",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "Terms",
"label": "Stored payment terms code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "Terms",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ProjectID",
"label": "Stored project code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ProjectID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "CuryID",
"label": "Stored header currency code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryID",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "CuryPOAmt",
"label": "Stored order amount — header currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryPOAmt",
"type": "number",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "CuryPOItemTotal",
"label": "Stored item total — header currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryPOItemTotal",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "CuryFreight",
"label": "Stored freight — header currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryFreight",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "CuryRcptTotAmt",
"label": "Stored receipt total — header currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryRcptTotAmt",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendID",
"label": "Supplier business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendID",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "VendName",
"label": "Supplier name on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendName",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "VendAttn",
"label": "Supplier contact on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendAttn",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendPhone",
"label": "Supplier phone on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendPhone",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendEmail",
"label": "Supplier email on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendEmail",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendAddrID",
"label": "Supplier address business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendAddrID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendAddr1",
"label": "Supplier address line 1 on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendAddr1",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendAddr2",
"label": "Supplier address line 2 on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendAddr2",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendCity",
"label": "Supplier city on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendCity",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendState",
"label": "Supplier state / region on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendState",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendZip",
"label": "Supplier postal code on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendZip",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VendCountry",
"label": "Supplier country code on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VendCountry",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipName",
"label": "Order shipping name",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipName",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipAttn",
"label": "Order shipping contact",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipAttn",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipPhone",
"label": "Order shipping phone",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipPhone",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipEmail",
"label": "Order shipping email",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipEmail",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipAddr1",
"label": "Order shipping address line 1",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipAddr1",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipAddr2",
"label": "Order shipping address line 2",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipAddr2",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipCity",
"label": "Order shipping city",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipCity",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipState",
"label": "Order shipping state / region",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipState",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipZip",
"label": "Order shipping postal code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipZip",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipCountry",
"label": "Order shipping country code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipCountry",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipSiteID",
"label": "Order shipping site code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipSiteID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipVia",
"label": "Order shipping method code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipVia",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShiptoType",
"label": "Stored ship-to type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShiptoType",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShiptoID",
"label": "Stored ship-to business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShiptoID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "FOB",
"label": "Stored freight responsibility code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "FOB",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "LastRcptDate",
"label": "Stored last receipt date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "LastRcptDate",
"type": "date",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "RcptStage",
"label": "Stored receipt stage code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "RcptStage",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VouchStage",
"label": "Stored voucher stage code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VouchStage",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "BlktPONbr",
"label": "Blanket order number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "BlktPONbr",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "BlktExprDate",
"label": "Blanket expiry date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "BlktExprDate",
"type": "date",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "LineAvailability",
"label": "Purchase-position identity availability",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "LineAvailability",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "OrderScope",
"label": "Order record scope",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "OrderScope",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
}
],
"maxRows": 1000,
"name": "Purchase orders",
"primaryKey": "PurchaseKey",
"queryParameters": [],
"refreshPolicy": {
"enabled": false,
"intervalMinutes": 60
},
"rootArrayPath": "",
"rowLimitEnabled": true,
"searchKeys": [
"PONbr",
"CpnyID",
"PODate",
"POType",
"Status",
"OpenPO",
"Buyer",
"BuyerEmail",
"ConfirmTo",
"ReqNbr",
"Terms",
"ProjectID",
"CuryID",
"CuryPOAmt",
"CuryPOItemTotal",
"CuryFreight",
"CuryRcptTotAmt",
"VendID",
"VendName",
"VendAttn",
"VendPhone",
"VendEmail",
"VendAddrID",
"VendAddr1",
"VendAddr2",
"VendCity",
"VendState",
"VendZip",
"VendCountry",
"ShipName",
"ShipAttn",
"ShipPhone",
"ShipEmail",
"ShipAddr1",
"ShipAddr2",
"ShipCity",
"ShipState",
"ShipZip",
"ShipCountry",
"ShipSiteID",
"ShipVia",
"ShiptoType",
"ShiptoID",
"FOB",
"LastRcptDate",
"RcptStage",
"VouchStage",
"BlktPONbr",
"BlktExprDate",
"LineAvailability",
"OrderScope"
],
"sourceID": "AB64FF01-394A-5304-B406-22E6691D5760",
"sqlQuery": "SELECT RTRIM(CAST(m.PONbr AS nvarchar(max))) AS PONbr,RTRIM(CAST(m.CpnyID AS nvarchar(max))) AS CpnyID,m.PODate AS PODate,m.POType AS POType,m.Status AS Status,m.OpenPO AS OpenPO,m.Buyer AS Buyer,m.BuyerEmail AS BuyerEmail,m.ConfirmTo AS ConfirmTo,m.ReqNbr AS ReqNbr,m.Terms AS Terms,m.ProjectID AS ProjectID,m.CuryID AS CuryID,m.CuryPOAmt AS CuryPOAmt,m.CuryPOItemTotal AS CuryPOItemTotal,m.CuryFreight AS CuryFreight,m.CuryRcptTotAmt AS CuryRcptTotAmt,m.VendID AS VendID,m.VendName AS VendName,m.VendAttn AS VendAttn,m.VendPhone AS VendPhone,m.VendEmail AS VendEmail,m.VendAddrID AS VendAddrID,m.VendAddr1 AS VendAddr1,m.VendAddr2 AS VendAddr2,m.VendCity AS VendCity,m.VendState AS VendState,m.VendZip AS VendZip,m.VendCountry AS VendCountry,m.ShipName AS ShipName,m.ShipAttn AS ShipAttn,m.ShipPhone AS ShipPhone,m.ShipEmail AS ShipEmail,m.ShipAddr1 AS ShipAddr1,m.ShipAddr2 AS ShipAddr2,m.ShipCity AS ShipCity,m.ShipState AS ShipState,m.ShipZip AS ShipZip,m.ShipCountry AS ShipCountry,m.ShipSiteID AS ShipSiteID,m.ShipVia AS ShipVia,m.ShiptoType AS ShiptoType,m.ShiptoID AS ShiptoID,m.FOB AS FOB,m.LastRcptDate AS LastRcptDate,m.RcptStage AS RcptStage,m.VouchStage AS VouchStage,m.BlktPONbr AS BlktPONbr,m.BlktExprDate AS BlktExprDate,CONCAT(CASE WHEN RTRIM(CAST(m.PONbr AS nvarchar(max))) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(RTRIM(CAST(m.PONbr AS nvarchar(max))) AS nvarchar(max))),N':',CAST(RTRIM(CAST(m.PONbr AS nvarchar(max))) AS nvarchar(max)),N';') END) AS PurchaseKey,CONCAT(CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max)),N';') END) AS PurchaseContext,CASE WHEN NOT (NOT EXISTS (SELECT 1 FROM dbo.PurOrdDet bad WHERE (RTRIM(CAST(bad.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.PONbr AS nvarchar(max))))) AND ((bad.PONbr IS NULL OR RTRIM(CAST(bad.PONbr AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))>20) OR (bad.LineRef IS NULL OR RTRIM(CAST(bad.LineRef AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.LineRef AS nvarchar(max))))>10) OR (bad.CpnyID IS NULL OR RTRIM(CAST(bad.CpnyID AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))>20) OR NOT (RTRIM(CAST(bad.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.CpnyID AS nvarchar(max))))))) AND NOT EXISTS (SELECT 1 FROM dbo.PurOrdDet bad WHERE (RTRIM(CAST(bad.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.PONbr AS nvarchar(max))))) GROUP BY CAST(RTRIM(CAST(bad.LineRef AS nvarchar(max))) AS nvarchar(5)) COLLATE Latin1_General_100_BIN2,DATALENGTH(RTRIM(CAST(bad.LineRef AS nvarchar(max)))) HAVING COUNT(1)<>1)) THEN N'Ambiguous / invalid position identity or company' WHEN EXISTS (SELECT 1 FROM dbo.PurOrdDet a WHERE (RTRIM(CAST(a.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.PONbr AS nvarchar(max)))))) THEN N'Available on demand' ELSE N'No stored positions' END AS LineAvailability,N'Original purchase order, not an invoice, current supplier or paid balance' AS OrderScope FROM dbo.PurchOrd m WHERE NOT EXISTS (SELECT 1 FROM dbo.PurchOrd bad WHERE (bad.PONbr IS NULL OR RTRIM(CAST(bad.PONbr AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))>20) OR (bad.CpnyID IS NULL OR RTRIM(CAST(bad.CpnyID AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))>20)) AND NOT EXISTS (SELECT 1 FROM dbo.PurchOrd bad GROUP BY CAST(RTRIM(CAST(bad.PONbr AS nvarchar(max))) AS nvarchar(10)) COLLATE Latin1_General_100_BIN2,DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max)))) HAVING COUNT(1)<>1)",
"tableName": ""
},
{
"cacheMode": "live",
"calculatedFields": [],
"customQueryIntegrationName": "",
"endpointPath": "",
"fetchSortRules": [
{
"direction": "ascending",
"id": "0DFAD758-78C9-5201-B33A-DB0385E9511A",
"key": "LineNbr",
"type": "number"
},
{
"direction": "ascending",
"id": "4E8F481D-8093-58C3-91FF-319FBC463571",
"key": "PositionKey",
"type": "text"
}
],
"id": "E76669D2-E8F3-580A-9F62-06186E11DE20",
"mappings": [
{
"commonFieldKey": "",
"key": "PositionKey",
"label": "Internal complete purchase context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PositionKey",
"type": "text",
"visibleInDetail": false,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PurchaseKey",
"label": "Internal complete purchase context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PurchaseKey",
"type": "text",
"visibleInDetail": false,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PurchaseContext",
"label": "Internal complete purchase context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PurchaseContext",
"type": "text",
"visibleInDetail": false,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PONbr",
"label": "Purchase order number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PONbr",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "LineRef",
"label": "Position business reference",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "LineRef",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "CpnyID",
"label": "Stored line company code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CpnyID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "POType",
"label": "Stored line order type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "POType",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "LineNbr",
"label": "Stored line number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "LineNbr",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "InvtID",
"label": "Product business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "InvtID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "TranDesc",
"label": "Original position description",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "TranDesc",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PurchaseType",
"label": "Stored purchase type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PurchaseType",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "QtyOrd",
"label": "Stored quantity ordered",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "QtyOrd",
"type": "number",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "QtyRcvd",
"label": "Stored quantity received",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "QtyRcvd",
"type": "number",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "QtyReturned",
"label": "Stored quantity returned",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "QtyReturned",
"type": "number",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "QtyVouched",
"label": "Stored quantity vouched",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "QtyVouched",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PurchUnit",
"label": "Original purchase unit",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PurchUnit",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "CuryID",
"label": "Stored line currency code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryID",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "CuryUnitCost",
"label": "Stored unit cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryUnitCost",
"type": "number",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "CuryExtCost",
"label": "Stored extended cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryExtCost",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "CuryCostReceived",
"label": "Stored received cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryCostReceived",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "CuryCostReturned",
"label": "Stored returned cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryCostReturned",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "CuryCostVouched",
"label": "Stored vouched cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CuryCostVouched",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "SiteID",
"label": "Original line site code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "SiteID",
"type": "text",
"visibleInDetail": true,
"visibleInList": true
},
{
"commonFieldKey": "",
"key": "ReqdDate",
"label": "Stored required date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ReqdDate",
"type": "date",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PromDate",
"label": "Stored promised date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PromDate",
"type": "date",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "OpenLine",
"label": "Stored open-line flag",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "OpenLine",
"type": "number",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "RcptStage",
"label": "Stored line receipt stage code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "RcptStage",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "VouchStage",
"label": "Stored line voucher stage code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "VouchStage",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PurAcct",
"label": "Purchase account code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PurAcct",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PurSub",
"label": "Purchase subaccount code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PurSub",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ProjectID",
"label": "Line project code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ProjectID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "TaskID",
"label": "Line task code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "TaskID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ReqNbr",
"label": "Line requisition number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ReqNbr",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "SOOrdNbr",
"label": "Related sales-order number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "SOOrdNbr",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "SOLineRef",
"label": "Related sales-order line reference",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "SOLineRef",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "AlternateID",
"label": "Alternative product business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "AlternateID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "AltIDType",
"label": "Alternative-code type",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "AltIDType",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipName",
"label": "Original line shipping name",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipName",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipAddr1",
"label": "Original line shipping address line 1",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipAddr1",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipAddr2",
"label": "Original line shipping address line 2",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipAddr2",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipCity",
"label": "Original line shipping city",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipCity",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipState",
"label": "Original line shipping state / region",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipState",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipZip",
"label": "Original line shipping postal code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipZip",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipCountry",
"label": "Original line shipping country code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipCountry",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ShipViaID",
"label": "Original line shipping method code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ShipViaID",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ParentCurrency",
"label": "Parent header currency code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ParentCurrency",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ParentSupplier",
"label": "Parent supplier business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ParentSupplier",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "ParentOrderType",
"label": "Parent order type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "ParentOrderType",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "TypeContext",
"label": "Order-type consistency context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "TypeContext",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "CurrencyContext",
"label": "Currency-code consistency context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "CurrencyContext",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "PurchaseTypeMeaning",
"label": "Documented purchase type context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "PurchaseTypeMeaning",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
},
{
"commonFieldKey": "",
"key": "LineScope",
"label": "Original position value scope",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text",
"sourceColumn": "LineScope",
"type": "text",
"visibleInDetail": true,
"visibleInList": false
}
],
"maxRows": 1000,
"name": "Purchase order positions",
"primaryKey": "PositionKey",
"queryParameters": [
{
"constantValue": "",
"dayOffset": 0,
"fieldKey": "CpnyID",
"id": "E62AC190-2E48-536A-AAD5-A897328ADD60",
"name": "company",
"source": "parentField",
"type": "text"
},
{
"constantValue": "",
"dayOffset": 0,
"fieldKey": "PONbr",
"id": "5DC278AF-5B62-59E0-80D1-1B683C8F1ECC",
"name": "purchase",
"source": "parentField",
"type": "text"
},
{
"constantValue": "",
"dayOffset": 0,
"fieldKey": "PurchaseContext",
"id": "EDF5FC34-985F-549B-81BB-C80CD907383C",
"name": "purchaseContext",
"source": "parentField",
"type": "text"
}
],
"refreshPolicy": {
"enabled": false,
"intervalMinutes": 60
},
"rootArrayPath": "",
"rowLimitEnabled": true,
"searchKeys": [
"PONbr",
"LineRef",
"CpnyID",
"POType",
"LineNbr",
"InvtID",
"TranDesc",
"PurchaseType",
"QtyOrd",
"QtyRcvd",
"QtyReturned",
"QtyVouched",
"PurchUnit",
"CuryID",
"CuryUnitCost",
"CuryExtCost",
"CuryCostReceived",
"CuryCostReturned",
"CuryCostVouched",
"SiteID",
"ReqdDate",
"PromDate",
"OpenLine",
"RcptStage",
"VouchStage",
"PurAcct",
"PurSub",
"ProjectID",
"TaskID",
"ReqNbr",
"SOOrdNbr",
"SOLineRef",
"AlternateID",
"AltIDType",
"ShipName",
"ShipAddr1",
"ShipAddr2",
"ShipCity",
"ShipState",
"ShipZip",
"ShipCountry",
"ShipViaID",
"ParentCurrency",
"ParentSupplier",
"ParentOrderType",
"TypeContext",
"CurrencyContext",
"PurchaseTypeMeaning",
"LineScope"
],
"sourceID": "AB64FF01-394A-5304-B406-22E6691D5760",
"sqlQuery": "SELECT RTRIM(CAST(a.PONbr AS nvarchar(max))) AS PONbr,RTRIM(CAST(a.LineRef AS nvarchar(max))) AS LineRef,RTRIM(CAST(a.CpnyID AS nvarchar(max))) AS CpnyID,a.POType AS POType,a.LineNbr AS LineNbr,a.InvtID AS InvtID,a.TranDesc AS TranDesc,a.PurchaseType AS PurchaseType,a.QtyOrd AS QtyOrd,a.QtyRcvd AS QtyRcvd,a.QtyReturned AS QtyReturned,a.QtyVouched AS QtyVouched,a.PurchUnit AS PurchUnit,a.CuryID AS CuryID,a.CuryUnitCost AS CuryUnitCost,a.CuryExtCost AS CuryExtCost,a.CuryCostReceived AS CuryCostReceived,a.CuryCostReturned AS CuryCostReturned,a.CuryCostVouched AS CuryCostVouched,a.SiteID AS SiteID,a.ReqdDate AS ReqdDate,a.PromDate AS PromDate,a.OpenLine AS OpenLine,a.RcptStage AS RcptStage,a.VouchStage AS VouchStage,a.PurAcct AS PurAcct,a.PurSub AS PurSub,a.ProjectID AS ProjectID,a.TaskID AS TaskID,a.ReqNbr AS ReqNbr,a.SOOrdNbr AS SOOrdNbr,a.SOLineRef AS SOLineRef,a.AlternateID AS AlternateID,a.AltIDType AS AltIDType,a.ShipName AS ShipName,a.ShipAddr1 AS ShipAddr1,a.ShipAddr2 AS ShipAddr2,a.ShipCity AS ShipCity,a.ShipState AS ShipState,a.ShipZip AS ShipZip,a.ShipCountry AS ShipCountry,a.ShipViaID AS ShipViaID,CONCAT(CASE WHEN RTRIM(CAST(a.PONbr AS nvarchar(max))) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(RTRIM(CAST(a.PONbr AS nvarchar(max))) AS nvarchar(max))),N':',CAST(RTRIM(CAST(a.PONbr AS nvarchar(max))) AS nvarchar(max)),N';') END,CASE WHEN RTRIM(CAST(a.LineRef AS nvarchar(max))) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(RTRIM(CAST(a.LineRef AS nvarchar(max))) AS nvarchar(max))),N':',CAST(RTRIM(CAST(a.LineRef AS nvarchar(max))) AS nvarchar(max)),N';') END) AS PositionKey,CONCAT(CASE WHEN RTRIM(CAST(a.PONbr AS nvarchar(max))) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(RTRIM(CAST(a.PONbr AS nvarchar(max))) AS nvarchar(max))),N':',CAST(RTRIM(CAST(a.PONbr AS nvarchar(max))) AS nvarchar(max)),N';') END) AS PurchaseKey,:purchaseContext AS PurchaseContext,m.CuryID AS ParentCurrency,m.VendID AS ParentSupplier,m.POType AS ParentOrderType,CASE WHEN a.POType IS NULL OR m.POType IS NULL OR RTRIM(CAST(a.POType AS nvarchar(max)))=N'' OR RTRIM(CAST(m.POType AS nvarchar(max)))=N'' THEN N'Missing type code; unverified' WHEN (RTRIM(CAST(a.POType AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.POType AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.POType AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.POType AS nvarchar(max))))) THEN N'Source type codes agree' ELSE N'Source type codes differ' END AS TypeContext,CASE WHEN a.CuryID IS NULL OR m.CuryID IS NULL OR RTRIM(CAST(a.CuryID AS nvarchar(max)))=N'' OR RTRIM(CAST(m.CuryID AS nvarchar(max)))=N'' THEN N'Missing currency code; unverified' WHEN (RTRIM(CAST(a.CuryID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(m.CuryID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.CuryID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(m.CuryID AS nvarchar(max))))) THEN N'Source currency codes agree' ELSE N'Source currency codes differ; no conversion' END AS CurrencyContext,CASE RTRIM(CAST(a.PurchaseType AS nvarchar(max))) WHEN N'DL' THEN N'Description line' WHEN N'FR' THEN N'Freight charges' WHEN N'MI' THEN N'Miscellaneous charges' WHEN N'GI' THEN N'Goods for inventory' WHEN N'GS' THEN N'Goods for sales order' WHEN N'GP' THEN N'Goods for project' WHEN N'PI' THEN N'Goods for project inventory' WHEN N'PS' THEN N'Goods for project sales order' WHEN N'GN' THEN N'Goods for non-inventory' WHEN N'SE' THEN N'Services for expense' WHEN N'SP' THEN N'Services for project' ELSE N'Unmapped source code' END AS PurchaseTypeMeaning,N'Original position and its own currency values; no outstanding, paid or converted total' AS LineScope FROM dbo.PurOrdDet a INNER JOIN dbo.PurchOrd m ON (RTRIM(CAST(m.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(a.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(m.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(a.PONbr AS nvarchar(max))))) AND (RTRIM(CAST(m.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(a.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(m.CpnyID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(a.CpnyID AS nvarchar(max))))) WHERE (RTRIM(CAST(a.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:purchase AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:purchase AS nvarchar(max))))) AND (RTRIM(CAST(a.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:company AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(a.CpnyID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:company AS nvarchar(max))))) AND NOT EXISTS (SELECT 1 FROM dbo.PurchOrd bad WHERE (bad.PONbr IS NULL OR RTRIM(CAST(bad.PONbr AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))>20) OR (bad.CpnyID IS NULL OR RTRIM(CAST(bad.CpnyID AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))>20)) AND NOT EXISTS (SELECT 1 FROM dbo.PurchOrd bad GROUP BY CAST(RTRIM(CAST(bad.PONbr AS nvarchar(max))) AS nvarchar(10)) COLLATE Latin1_General_100_BIN2,DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max)))) HAVING COUNT(1)<>1) AND NOT EXISTS (SELECT 1 FROM dbo.PurOrdDet bad WHERE (RTRIM(CAST(bad.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:purchase AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:purchase AS nvarchar(max))))) AND ((bad.PONbr IS NULL OR RTRIM(CAST(bad.PONbr AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))>20) OR (bad.LineRef IS NULL OR RTRIM(CAST(bad.LineRef AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.LineRef AS nvarchar(max))))>10) OR (bad.CpnyID IS NULL OR RTRIM(CAST(bad.CpnyID AS nvarchar(max)))=N'' OR DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))>20) OR NOT (RTRIM(CAST(bad.CpnyID AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:company AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.CpnyID AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:company AS nvarchar(max))))))) AND NOT EXISTS (SELECT 1 FROM dbo.PurOrdDet bad WHERE (RTRIM(CAST(bad.PONbr AS nvarchar(max))) COLLATE Latin1_General_100_BIN2=RTRIM(CAST(:purchase AS nvarchar(max))) COLLATE Latin1_General_100_BIN2 AND DATALENGTH(RTRIM(CAST(bad.PONbr AS nvarchar(max))))=DATALENGTH(RTRIM(CAST(:purchase AS nvarchar(max))))) GROUP BY CAST(RTRIM(CAST(bad.LineRef AS nvarchar(max))) AS nvarchar(5)) COLLATE Latin1_General_100_BIN2,DATALENGTH(RTRIM(CAST(bad.LineRef AS nvarchar(max)))) HAVING COUNT(1)<>1) AND (CONCAT(CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max)),N';') END) COLLATE Latin1_General_100_BIN2=:purchaseContext COLLATE Latin1_General_100_BIN2 AND DATALENGTH(CONCAT(CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CpnyID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.PODate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.POType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Status),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.OpenPO),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Buyer),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BuyerEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ConfirmTo),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ReqNbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.Terms),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ProjectID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryPOItemTotal),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryFreight),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.CuryRcptTotAmt),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddrID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VendCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipName),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAttn),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipPhone),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipEmail),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr1),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipAddr2),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCity),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipState),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipZip),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipCountry),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipSiteID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShipVia),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoType),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.ShiptoID),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.FOB),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.LastRcptDate),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.RcptStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.VouchStage),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktPONbr),2) AS nvarchar(max)),N';') END,CASE WHEN CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) IS NULL THEN CAST(N'~;' AS nvarchar(max)) ELSE CONCAT(N'=',DATALENGTH(CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max))),N':',CAST(CONVERT(varchar(max),CONVERT(varbinary(max),m.BlktExprDate),2) AS nvarchar(max)),N';') END))=DATALENGTH(:purchaseContext))",
"tableName": ""
}
],
"pages": [
{
"actions": [
{
"id": "0B89AF4E-5FB1-53D6-AAA3-659F707A7229",
"kind": "showRelated",
"relatedInitiallyExpanded": false,
"relatedPresentation": "separate",
"relatedPreviewLimit": 12,
"relatedRowStyle": "cards",
"relatedShowsCount": true,
"relationID": "7EE1E08A-F87C-5565-B64F-0ADFE8800337",
"systemImage": "list.bullet.rectangle",
"targetDatasetID": "E76669D2-E8F3-580A-9F62-06186E11DE20",
"title": "Purchase positions",
"urlKey": ""
}
],
"badgeKey": "",
"cardEnrichments": [],
"cardFieldLayout": [
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "VendID",
"label": "Supplier code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "VendName",
"label": "Supplier on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "PODate",
"label": "Order date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "CpnyID",
"label": "Company",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "CuryID",
"label": "Source currency code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "CuryPOAmt",
"label": "Stored order amount",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "Status",
"label": "Status code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "LineAvailability",
"label": "Purchase positions",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
}
],
"datasetID": "0E82EAAE-19B1-50ED-BA05-3657CA5948BA",
"dateFilterKey": "",
"dateFilterLastDays": 7,
"dateFilterPreset": "none",
"detailFieldLayout": [
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "PONbr",
"label": "Purchase order number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "CpnyID",
"label": "Stored company code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "PODate",
"label": "Stored order date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "POType",
"label": "Stored order type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "Status",
"label": "Stored order status code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "OpenPO",
"label": "Stored open-order flag",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "Buyer",
"label": "Buyer business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "BuyerEmail",
"label": "Buyer email on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "ConfirmTo",
"label": "Order confirmation code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "ReqNbr",
"label": "Requisition number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "Terms",
"label": "Stored payment terms code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Order identity and purchasing",
"detailRole": "information",
"isVisible": true,
"key": "ProjectID",
"label": "Stored project code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored header-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryID",
"label": "Stored header currency code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored header-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryPOAmt",
"label": "Stored order amount — header currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored header-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryPOItemTotal",
"label": "Stored item total — header currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored header-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryFreight",
"label": "Stored freight — header currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored header-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryRcptTotAmt",
"label": "Stored receipt total — header currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier identity and contact",
"detailRole": "information",
"isVisible": true,
"key": "VendID",
"label": "Supplier business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier identity and contact",
"detailRole": "information",
"isVisible": true,
"key": "VendName",
"label": "Supplier name on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier identity and contact",
"detailRole": "information",
"isVisible": true,
"key": "VendAttn",
"label": "Supplier contact on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier identity and contact",
"detailRole": "information",
"isVisible": true,
"key": "VendPhone",
"label": "Supplier phone on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier identity and contact",
"detailRole": "information",
"isVisible": true,
"key": "VendEmail",
"label": "Supplier email on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier identity and contact",
"detailRole": "information",
"isVisible": true,
"key": "VendAddrID",
"label": "Supplier address business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier address on this order",
"detailRole": "information",
"isVisible": true,
"key": "VendAddr1",
"label": "Supplier address line 1 on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier address on this order",
"detailRole": "information",
"isVisible": true,
"key": "VendAddr2",
"label": "Supplier address line 2 on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier address on this order",
"detailRole": "information",
"isVisible": true,
"key": "VendCity",
"label": "Supplier city on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier address on this order",
"detailRole": "information",
"isVisible": true,
"key": "VendState",
"label": "Supplier state / region on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier address on this order",
"detailRole": "information",
"isVisible": true,
"key": "VendZip",
"label": "Supplier postal code on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original supplier address on this order",
"detailRole": "information",
"isVisible": true,
"key": "VendCountry",
"label": "Supplier country code on this order",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping contact",
"detailRole": "information",
"isVisible": true,
"key": "ShipName",
"label": "Order shipping name",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping contact",
"detailRole": "information",
"isVisible": true,
"key": "ShipAttn",
"label": "Order shipping contact",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping contact",
"detailRole": "information",
"isVisible": true,
"key": "ShipPhone",
"label": "Order shipping phone",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping contact",
"detailRole": "information",
"isVisible": true,
"key": "ShipEmail",
"label": "Order shipping email",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping address",
"detailRole": "information",
"isVisible": true,
"key": "ShipAddr1",
"label": "Order shipping address line 1",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping address",
"detailRole": "information",
"isVisible": true,
"key": "ShipAddr2",
"label": "Order shipping address line 2",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping address",
"detailRole": "information",
"isVisible": true,
"key": "ShipCity",
"label": "Order shipping city",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping address",
"detailRole": "information",
"isVisible": true,
"key": "ShipState",
"label": "Order shipping state / region",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping address",
"detailRole": "information",
"isVisible": true,
"key": "ShipZip",
"label": "Order shipping postal code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original order shipping address",
"detailRole": "information",
"isVisible": true,
"key": "ShipCountry",
"label": "Order shipping country code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Shipping method and destination codes",
"detailRole": "information",
"isVisible": true,
"key": "ShipSiteID",
"label": "Order shipping site code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Shipping method and destination codes",
"detailRole": "information",
"isVisible": true,
"key": "ShipVia",
"label": "Order shipping method code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Shipping method and destination codes",
"detailRole": "information",
"isVisible": true,
"key": "ShiptoType",
"label": "Stored ship-to type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Shipping method and destination codes",
"detailRole": "information",
"isVisible": true,
"key": "ShiptoID",
"label": "Stored ship-to business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Shipping method and destination codes",
"detailRole": "information",
"isVisible": true,
"key": "FOB",
"label": "Stored freight responsibility code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Receipt, voucher and blanket context",
"detailRole": "information",
"isVisible": true,
"key": "LastRcptDate",
"label": "Stored last receipt date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Receipt, voucher and blanket context",
"detailRole": "information",
"isVisible": true,
"key": "RcptStage",
"label": "Stored receipt stage code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Receipt, voucher and blanket context",
"detailRole": "information",
"isVisible": true,
"key": "VouchStage",
"label": "Stored voucher stage code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Receipt, voucher and blanket context",
"detailRole": "information",
"isVisible": true,
"key": "BlktPONbr",
"label": "Blanket order number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Receipt, voucher and blanket context",
"detailRole": "information",
"isVisible": true,
"key": "BlktExprDate",
"label": "Blanket expiry date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "On-demand reading and scope",
"detailRole": "information",
"isVisible": true,
"key": "LineAvailability",
"label": "Purchase-position identity availability",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "On-demand reading and scope",
"detailRole": "information",
"isVisible": true,
"key": "OrderScope",
"label": "Order record scope",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
}
],
"detailLiveRefreshSeconds": 0,
"fixedFilters": [],
"id": "34FD65C0-8595-5D0A-9445-4B40D47677EF",
"openFilters": [
{
"datePeriodOptions": [
"today",
"currentMonth",
"last7Days",
"last30Days",
"last90Days"
],
"id": "8ED39307-C131-5A43-AA9A-9148C76491B3",
"includeAllOption": false,
"key": "PODate",
"title": "Purchase-order date period",
"type": "date"
},
{
"id": "6C289EEA-BF42-5BE7-A691-557C9389CF27",
"includeAllOption": false,
"key": "CpnyID",
"title": "Company",
"type": "text"
}
],
"pageSize": 100,
"requiresOpeningFilterSelection": true,
"showOnHome": true,
"sortRules": [
{
"direction": "descending",
"id": "27AE8C95-174F-5108-8F94-0E503009BFF2",
"key": "PODate",
"type": "date"
},
{
"direction": "ascending",
"id": "D9D3F2E5-5862-5CBA-B44B-A8BD2A342F44",
"key": "PONbr",
"type": "text"
},
{
"direction": "ascending",
"id": "2091E240-8C02-5A24-B572-2997A5AC0BBD",
"key": "PurchaseKey",
"type": "text"
}
],
"subtitle": "",
"subtitleKey": "VendName",
"systemImage": "cart",
"title": "Purchase orders",
"titleKey": "PONbr"
},
{
"actions": [],
"badgeKey": "",
"cardEnrichments": [],
"cardFieldLayout": [
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "PurchaseType",
"label": "Purchase type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "QtyOrd",
"label": "Ordered qty",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "PurchUnit",
"label": "Purchase unit",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "QtyRcvd",
"label": "Received qty",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "QtyReturned",
"label": "Returned qty",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "CuryUnitCost",
"label": "Stored unit cost",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "CuryID",
"label": "Source currency code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "",
"detailRole": "information",
"isVisible": true,
"key": "SiteID",
"label": "Site code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
}
],
"datasetID": "E76669D2-E8F3-580A-9F62-06186E11DE20",
"dateFilterKey": "",
"dateFilterLastDays": 7,
"dateFilterPreset": "none",
"detailFieldLayout": [
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "TranDesc",
"label": "Original position description",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "PONbr",
"label": "Purchase order number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "LineRef",
"label": "Position business reference",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "LineNbr",
"label": "Stored line number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "CpnyID",
"label": "Stored line company code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "InvtID",
"label": "Product business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "ParentSupplier",
"label": "Parent supplier business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "POType",
"label": "Stored line order type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "ParentOrderType",
"label": "Parent order type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position and parent identity",
"detailRole": "information",
"isVisible": true,
"key": "TypeContext",
"label": "Order-type consistency context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Purchase type and separate quantities",
"detailRole": "information",
"isVisible": true,
"key": "PurchaseType",
"label": "Stored purchase type code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Purchase type and separate quantities",
"detailRole": "information",
"isVisible": true,
"key": "PurchaseTypeMeaning",
"label": "Documented purchase type context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Purchase type and separate quantities",
"detailRole": "information",
"isVisible": true,
"key": "QtyOrd",
"label": "Stored quantity ordered",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Purchase type and separate quantities",
"detailRole": "information",
"isVisible": true,
"key": "QtyRcvd",
"label": "Stored quantity received",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Purchase type and separate quantities",
"detailRole": "information",
"isVisible": true,
"key": "QtyReturned",
"label": "Stored quantity returned",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Purchase type and separate quantities",
"detailRole": "information",
"isVisible": true,
"key": "QtyVouched",
"label": "Stored quantity vouched",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Purchase type and separate quantities",
"detailRole": "information",
"isVisible": true,
"key": "PurchUnit",
"label": "Original purchase unit",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored line-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryID",
"label": "Stored line currency code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored line-currency values",
"detailRole": "information",
"isVisible": true,
"key": "ParentCurrency",
"label": "Parent header currency code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored line-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CurrencyContext",
"label": "Currency-code consistency context",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored line-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryUnitCost",
"label": "Stored unit cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored line-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryExtCost",
"label": "Stored extended cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored line-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryCostReceived",
"label": "Stored received cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored line-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryCostReturned",
"label": "Stored returned cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Separate stored line-currency values",
"detailRole": "information",
"isVisible": true,
"key": "CuryCostVouched",
"label": "Stored vouched cost — line currency",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Scheduling and native stage flags",
"detailRole": "information",
"isVisible": true,
"key": "SiteID",
"label": "Original line site code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Scheduling and native stage flags",
"detailRole": "information",
"isVisible": true,
"key": "ReqdDate",
"label": "Stored required date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Scheduling and native stage flags",
"detailRole": "information",
"isVisible": true,
"key": "PromDate",
"label": "Stored promised date",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Scheduling and native stage flags",
"detailRole": "information",
"isVisible": true,
"key": "OpenLine",
"label": "Stored open-line flag",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Scheduling and native stage flags",
"detailRole": "information",
"isVisible": true,
"key": "RcptStage",
"label": "Stored line receipt stage code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Scheduling and native stage flags",
"detailRole": "information",
"isVisible": true,
"key": "VouchStage",
"label": "Stored line voucher stage code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Accounts, project and related business references",
"detailRole": "information",
"isVisible": true,
"key": "PurAcct",
"label": "Purchase account code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Accounts, project and related business references",
"detailRole": "information",
"isVisible": true,
"key": "PurSub",
"label": "Purchase subaccount code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Accounts, project and related business references",
"detailRole": "information",
"isVisible": true,
"key": "ProjectID",
"label": "Line project code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Accounts, project and related business references",
"detailRole": "information",
"isVisible": true,
"key": "TaskID",
"label": "Line task code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Accounts, project and related business references",
"detailRole": "information",
"isVisible": true,
"key": "ReqNbr",
"label": "Line requisition number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Accounts, project and related business references",
"detailRole": "information",
"isVisible": true,
"key": "SOOrdNbr",
"label": "Related sales-order number",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Accounts, project and related business references",
"detailRole": "information",
"isVisible": true,
"key": "SOLineRef",
"label": "Related sales-order line reference",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Accounts, project and related business references",
"detailRole": "information",
"isVisible": true,
"key": "AlternateID",
"label": "Alternative product business code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Accounts, project and related business references",
"detailRole": "information",
"isVisible": true,
"key": "AltIDType",
"label": "Alternative-code type",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position shipping destination",
"detailRole": "information",
"isVisible": true,
"key": "ShipName",
"label": "Original line shipping name",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position shipping destination",
"detailRole": "information",
"isVisible": true,
"key": "ShipAddr1",
"label": "Original line shipping address line 1",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position shipping destination",
"detailRole": "information",
"isVisible": true,
"key": "ShipAddr2",
"label": "Original line shipping address line 2",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position shipping destination",
"detailRole": "information",
"isVisible": true,
"key": "ShipCity",
"label": "Original line shipping city",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position shipping destination",
"detailRole": "information",
"isVisible": true,
"key": "ShipState",
"label": "Original line shipping state / region",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position shipping destination",
"detailRole": "information",
"isVisible": true,
"key": "ShipZip",
"label": "Original line shipping postal code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position shipping destination",
"detailRole": "information",
"isVisible": true,
"key": "ShipCountry",
"label": "Original line shipping country code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Original position shipping destination",
"detailRole": "information",
"isVisible": true,
"key": "ShipViaID",
"label": "Original line shipping method code",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
},
{
"detailGroup": "Scope",
"detailRole": "information",
"isVisible": true,
"key": "LineScope",
"label": "Original position value scope",
"locationLabelKey": "",
"locationLongitudeKey": "",
"presentation": "text"
}
],
"detailLiveRefreshSeconds": 0,
"fixedFilters": [],
"id": "E4102652-67FD-58EA-9AC3-AE910B56DBCE",
"openFilters": [],
"pageSize": 100,
"requiresOpeningFilterSelection": false,
"showOnHome": false,
"sortRules": [
{
"direction": "ascending",
"id": "0DFAD758-78C9-5201-B33A-DB0385E9511A",
"key": "LineNbr",
"type": "number"
},
{
"direction": "ascending",
"id": "4E8F481D-8093-58C3-91FF-319FBC463571",
"key": "PositionKey",
"type": "text"
}
],
"subtitle": "",
"subtitleKey": "LineRef",
"systemImage": "list.bullet",
"title": "Purchase positions",
"titleKey": "TranDesc"
}
],
"relations": [
{
"childDatasetID": "E76669D2-E8F3-580A-9F62-06186E11DE20",
"childKey": "PurchaseKey",
"id": "7EE1E08A-F87C-5565-B64F-0ADFE8800337",
"name": "Purchase positions",
"parentDatasetID": "0E82EAAE-19B1-50ED-BA05-3657CA5948BA",
"parentKey": "PurchaseKey"
}
],
"widgets": []
}
},
"format": "cifru-configuration-package",
"formatVersion": 1,
"manifest": {
"applicationName": "Microsoft Dynamics SL",
"configurationLanguages": [
"en"
],
"countries": [
"US"
],
"createdAt": "2026-10-10T00:00:00Z",
"description": "UNOFFICIAL — NOT VALIDATED ON A REAL ERP INSTALLATION.\n\nFor purchasing, receiving, accounts payable and project teams: choose a purchase-order date period and company, find an order and inspect the original supplier, contacts and addresses, buyer, native amounts, shipping destination and blanket/receipt context. Open Purchase positions only when needed: goods, services, description/freight lines, separate quantities and native costs, units, promised/required dates, accounts, project/task and original position shipping destinations.\n\nWhy Cifru? Adapt configurations to the way you work. Choose the fields, filters and details you need, and bring information to your phone that may not be available in your business software’s own mobile app. Available options depend on the data exposed by your authorized source and your Cifru plan.\n\nPro: one SQL source, one Home button, two lists and one lazy related button. 51 order and 49 position values in grouped Details, eight fields per card; hidden technical identity/context, Search, native period and company opening filters. Live lists cap at 1,000 rows each, no automatic refresh or all-line preload. Identity checks can scan beyond the visible cap; not complete-company totals or measured performance.\n\nOwn pinned Microsoft registrations and migration code document PurchOrd/PurOrdDet and PONbr binding. AL logical keys are order number and order number+position reference, not an invented company/type triple. Reused order numbers across companies are ambiguous and reject the root. Company consistency is checked additionally; invalid/duplicate references or wrong-company positions block only their own order. All 49 selected original order values are revalidated before positions load. No first match, silent dedup or unscoped PONbr-only child access. AL declarations do not certify installed SQL owner/DDL/PK/FK.\n\nOriginal order supplier and shipping records stay separate from the original position destination; no current Vendor/Inventory substitution. POType, status, open flags and receipt/voucher stages remain raw source values, not payment/posting/eligibility promises. Documented PurchaseType meanings are shown as migration context; unknown codes remain unmapped. Not restricted to migration-eligible open regular orders, and not every position is a product.\n\nQtyOrd/QtyRcvd/QtyReturned/QtyVouched and PurchUnit are separate stored values. No ordered-minus-received, unit conversion or availability formula. Header Cury-prefixed amounts retain header CuryID; positions retain their own CuryID and native Cury-prefixed costs, with parent code shown separately. Missing or different currency/type codes are displayed explicitly, never silently inherited or converted. No ISO guarantee, tax/payment balance, FX, signed total, aggregation or quantity-times-cost calculation. NULL, zero and negative values remain original. Opening period is PODate, not posting/receipt or line dates.\n\nDocumentary and adapted synthetic/native DEMO validation only. No real Dynamics SL, SQL Server, iOS, installed DDL/storage/index/query plan/release, ERP ACL or compatibility/performance certified. Verify the proposed dbo owner and authorised SL business database during import/read test; not a Business Central migration destination. Company filters and hidden keys are not access control: direct SQL does not inherit ERP permissions. Require a separately administrator-scoped SELECT-only reporting login; do not copy migration sysadmin/db_owner instructions or execute migration writes.\n\nNo source credentials, host, passwords, bank, audit/user, custom/future or technical row-ID columns. Business contacts and commercial amounts can still be confidential. Screenshots are wholly fictional DEMO, not a real ERP installation. Eight public images are representative, not all possible rows or every Detail position; complete native overlap evidence is retained locally. Unofficial, not Microsoft endorsed. Distinct legacy installed-base SL with July 2028 extended-support boundary, not a current top-three or no-mobile claim.\n\nSource registration: https://github.com/microsoft/ALAppExtensions/blob/e7ed235bc979c0283306e9639ff7cd22ce78341d/Apps/W1/HybridSL/app/src/codeunits/SLHybridWizard.Codeunit.al\nOrder fields: https://github.com/microsoft/ALAppExtensions/blob/e7ed235bc979c0283306e9639ff7cd22ce78341d/Apps/W1/HybridSL/app/src/Migration/PuchaseOrders/SLPurchOrdBuffer.Table.al\nPosition fields: https://github.com/microsoft/ALAppExtensions/blob/e7ed235bc979c0283306e9639ff7cd22ce78341d/Apps/W1/HybridSL/app/src/Migration/PuchaseOrders/SLPurOrdDetBuffer.Table.al\nExplicit order binding and purchase types: https://github.com/microsoft/ALAppExtensions/blob/e7ed235bc979c0283306e9639ff7cd22ce78341d/Apps/W1/HybridSL/app/src/Migration/PuchaseOrders/SLPOMigrator.Codeunit.al",
"licenseCode": "Cifru-Community-1.0",
"minimumCifruVersion": "1.1.0",
"minimumPlan": "pro",
"packageID": "0662F423-63BF-5E03-B798-D8B3920DA82C",
"rootButtonCount": 1,
"summary": "Date/company selection, original supplier/shipping records and native amounts; lazy positions with quantities, units, costs, schedules and project/account context.",
"tags": [
"Dynamics SL",
"SQL Server",
"Purchase orders",
"Purchasing",
"Receiving",
"Projects",
"Pro"
],
"title": "Purchase orders and complete position dossier — Pro"
}
}