I created a summary table and one of the columns need Value Ordering. The script to create a column with properties says:
New Column( "Contract",
Character( 4 ),
Nominal,
Set Property(
"Value Ordering",
{"CIS", "LOC", "WEU", "UK", "EEU", "MEA", "GRP", "OTH", "NRD", "DIR",
"COR", "COMP"}
),
Set Selected,
Set Values(
{"CIS", "LOC", "WEU", "UK", "EEU", "MEA", "GRP", "OTH", "NRD", "DIR",
"COR", "COMP"}
)
)
However, I would not like to create the table from scratch but apply the value ordering to the summary table column (hence the summary table is dynamic), where should I insert the script of just adding value ordering to an existing script:
Data Table( "AccomodationBudget.jmp" ) << Summary(
Group( :Contract ),
Sum( :RoomNight ),
Sum( :AdultNight ),
Sum( :NetRoomRevenueWithOutVat ),
Subgroup( :Label ),
Link to original data table( 0 )
),
New Column( "MinADRMarket",
Numeric,
Continuous,
Format( Currency( "EUR" ), 17, 2 ),
Formula(
(:Name( "Sum(NetRoomRevenueWithOutVat, Budget)" ) -
:Name( "Sum(NetRoomRevenueWithOutVat, 2015)" )) / (:Name( "Sum(RoomNight, Budget)" )
- :Name( "Sum(RoomNight, 2015)" ))
)
),
New Column( "MinADBMarket",
Numeric,
Continuous,
Format( Currency( "EUR" ), 17, 2 ),
Formula(
(:Name( "Sum(NetRoomRevenueWithOutVat, Budget)" ) -
:Name( "Sum(NetRoomRevenueWithOutVat, 2015)" )) / (:Name( "Sum(AdultNight, Budget)" )
- :Name( "Sum(AdultNight, 2015)" ))
)
),