I did some further testing and found the following.
- When I take a query that has always been a normal query, I can add a calculated column with all fields enabled, so all good.
- When I take a query that was previously implemented by a SQL statement but now changed back to a normal query that uses the FIND question, it does not work: in this case when adding a calculated column the column name and calculation fields are disabled, as described earlier.
Therefore, it seems that the status of the query is not reset when it is changed from a SQL query to a regular FIND query. The same happens if a EXEC_SP query is changed into a regular query.
Steps to reproduce:
- Create a query implemented by EXEC_SQL or EXEC_SP
- Make it a normal query by changing the query text to ‘FIND ALL BO’ or something like that.
- Try to add a calculated column
Last but not least, I still have the question about calculated fields when using a SQL/SP query. The form in the configuration tool says:
“If the query is implemented by a stored procedure or raw SQL, you need to provide calculation type only, as the rest will be determined by the SQL (in this case the calculation is performed by the stored procedure or SQL)”
How does this work, what field name should be used in the SP or SELECT statement to get the result in the dynamic column?