define variable policy as IPartitionPolicy no-undo.
define variable tbl as ITable no-undo. assign /* get the table from the service */ Tbl = Service:GetTable("Employee") /* get a new empty policy from the service */ policy = Service:NewPartitionPolicy("EmployeePolicy") policy:Description = "Employee department partition") policy:DefaultDataArea = Service:GetArea("Area1") policy:DefaultIndexArea = Service:GetArea("Area1Idx"). policy:DefaultLobArea = Service:GetArea("Area1Lob") policy:DefaultAllocation = "Delayed" policy:Table = tbl /* add the field to the policy - found on the table */ policy:Fields:Add(tbl:Fields:Find("State")). service:UpdatePolicyDetail(policy). |