The StateHash is one-of-two important components of DataFlex History Management. It is used by DataFlex to uniquely identify the state of the WebApp. It indicates which view is being shown, the path taken, and which record is currently in view.
Example URL: http://localhost/WebOrderMobile_19_1/Index.html#SalesPersons/Orders-BR/Order-2195
In this URL, the StateHash starts at the hastag - “#SalesPersons/Orders-BR/Order-2195”
This StateHash indicates that SalesPersons was passed through, then Orders-BR to get to the Order view and finally to the live screen, which is record number 2195.
A StateHash is built the same way every time. It starts with a hashtag, followed by the viewpath, then the recordid and finally some customdata.
The viewpath is the unique path to get to a view
The recordID is the record currently being viewed from the DataDictionary
Customdata can be anything
Note the difference between desktop and drilldown style webapps.
With desktop style, navigation can only go one level deep, so the StateHash stays relatively simple.
With Drilldown, the StateHash represents the entire view stack. There are also several ways to get to a certain view, this is also reflected in the StateHash. This basically means that StateHash segments are chained: