I'm pretty sure that the "GetFieldDescription" only supports field names as argument. A field is a static concept in the app that is produced when you reload the app and if I understand it correctly, that is the information accessed by that method. Dimensions, though closely related to fields, are not fields, and the expression you use in the failing call is an expression used to define a calculated dimension. The data for such a dimension (cardinality etc) will depend on the selection state of the engine and will therefore require calculations from the engine on the fly.
But! If you do want to get information regarding such a dimension, then what you could do is to create a generic session object with a list object in it and use the calculated dimension there. Then you will get information about the dimension in qDimension property of the layout of the list object:
Thank you @yko, that is an interesting approach. This could possibly help for gathering information about standalone dimensions, let me try this out.
Here is what we are trying to achieve:
A user can go to app sheet, pick any filters he wants, and then sends this info to back end. In the back end we connect to Qlik using web socket, create a temporary session, load the table object into the session and then apply filters on top of it. And then this filtered data is returned back to the user.
Here is a situation where the data is a little more complex - say we have a table with column names as below:
One more consideration here is that these tables could be created by users with whatever column names they may want. We wouldn't always know what the field is that is creating the dimension. And also there could be multiple dimensions that could be selected for filtering data.
Note: This approach worked for us for as long as we used static fields for filters (inclusive of the scenario where the other column names in the table may contain calculated values).
Any guidance on how we could possibly approach this would be greatly appreciated.