Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys, I need some advice. We use conditional enablement to a large extend to enable users to create their own ad-hoc reports from a Pivot or Straight table view. We give them Selectable Fields (Dimensions) and Selectable Measures (Expressions) . It’s then also important for the users to create bookmarks on their selections and for the bookmark to remember the layout of the view and selections made for future use. The problem I have however is that if I add more selectable fields to Selectable Fields or Measures it breaks the bookmarks. Can you possibly assist in a logic that will cater for this? Script: Dim_CustomView_Mapping: Mapping LOAD ID, DIM_ID as _Dim_ID FROM [http://$(vServerName):4780/QMS/AuthTable] (html, utf8, embedded labels, table is [Custom View Sort]); Exp_CustomView_Mapping: Mapping LOAD ID, DIM_ID as _Exp_ID FROM [http://$(vServerName):4780/QMS/AuthTable] (html, utf8, embedded labels, table is [Custom View Sort]); AdHoc_Dimensions_tmp: LOAD * INLINE [ Selectable Fields Sales Channel Department ID Department Name Sub Dept ID Sub Dept Name Class ID Class Name Branch ID Branch Name Branch Type UPC SKU Barcode Item Description UPC Type InActive Unit Customer ID Customer Name Supplier Supplier Product Code Unique Trans ID Trans No Station Receipt Fiscal Year Fiscal Month Fiscal Week Week Day Sale Date ]; AdHoc_Dimensions: NoConcatenate LOAD [Selectable Fields], ApplyMap('Dim_CustomView_Mapping',RowNo(),null()) as _Dim_ID, RowNo() as _Dim_Sort Resident AdHoc_Dimensions_tmp; DROP Table AdHoc_Dimensions_tmp; //_Dim_Sort //_Dim_ID AdHoc_Expressions_tmp: LOAD * INLINE [ Selectable Measures Sales $ Avg Sell Price Current Avg Retail Price Avg Set Price Unit Cost Total Cost GM $ GM % Trans Count Sales Units Avg Trans Value Sales Cont GM Cont ]; AdHoc_Expressions: NoConcatenate LOAD [Selectable Measures], ApplyMap('Exp_CustomView_Mapping',RowNo(),null()) as _Exp_ID, RowNo() as _Exp_Sort Resident AdHoc_Expressions_tmp; DROP Table AdHoc_Expressions_tmp; Thanks in Advance
James it is too much confusing.
Can you please come in simple and clear script.
Could you please upload a sample qvw?
I have the same problem long time ago but I have not found a good solution, the changes in the data model break the bookmarks. We implemented a politic of changes to name and replace the bookmarks and use a button with actions to help in the process.
Hope this helps
I have hacked through the wall of text and I think that it should be:
Script:
Dim_CustomView_Mapping: Mapping
LOAD ID,
DIM_ID as _Dim_ID FROM [http://$(vServerName):4780/QMS/AuthTable] (html, utf8, embedded labels, table is [Custom View Sort]);
Exp_CustomView_Mapping: Mapping LOAD ID,
DIM_ID as _Exp_ID
FROM [http://$(vServerName):4780/QMS/AuthTable] (html, utf8, embedded labels, table is [Custom View Sort]);
AdHoc_Dimensions_tmp:
LOAD * INLINE
[ Selectable Fields
Sales Channel
Department ID
Department Name
Sub Dept ID
Sub Dept Name
Class ID
Class Name
Branch ID
Branch Name
Branch Type
UPC
SKU
Barcode
Item Description
UPC Type
InActive Unit
Customer ID
Customer Name
Supplier
Supplier Product
Code Unique
Trans ID
Trans No
Station
Receipt
Fiscal Year
Fiscal Month
Fiscal Week
Week Day
Sale Date
];
AdHoc_Dimensions:
NoConcatenate
LOAD [Selectable Fields],
ApplyMap('Dim_CustomView_Mapping',
RowNo(),
null()) as _Dim_ID,
RowNo() as _Dim_Sort
Resident
AdHoc_Dimensions_tmp;
DROP Table AdHoc_Dimensions_tmp;
//_Dim_Sort //_Dim_ID AdHoc_Expressions_tmp:
LOAD * INLINE
[ Selectable Measures
Sales
$ Avg
Sell Price
Current Avg Retail Price
Avg Set Price
Unit Cost
Total Cost
GM $
GM %
Trans Count
Sales Units
Avg Trans Value
Sales Cont
GM Cont ];
AdHoc_Expressions: NoConcatenate
LOAD
[Selectable Measures],
ApplyMap('Exp_CustomView_Mapping',RowNo(),null()) as _Exp_ID,
RowNo() as _Exp_Sort
Resident AdHoc_Expressions_tmp;
DROP Table AdHoc_Expressions_tmp;
Hi James,
Yep that's the correct script. My apologies for the bad format. The outcome of the message came out much different after posting it.
Kind Regards
Hi Santiago
Thanks for your feedback.
Do you control the bookmarks through Macro's?
Kind Regards
Hi James,
Yes, I control the bookmark through a macro but it's only a help to replace the bookmark and it's necessary that the user make the right new selections. The button call a macro to delete the BM01 user bookmark and create a new bookmark with the same ID. This thread can help Recall BM through macro code Create Bookmark using Macro
Regards
Thanks for your feedback mate.
One more question. As far a I know macro's does not work in Ajax. Do you use Ajax
or the IE Plugin?
Kind Regards
The methods used in these macros do not always work in Ajax. To ensure implementation I use IE-Plugin for these users.
Regards