it is quite a task to decode the grid options (FORM_OPT)
So we got that 2^17 = 131072. Now the math gets involved 😀
Since all the form_opts are a toggle (0/1), we now need to eliminate anything greater than 17 and anything after 17.
The math that needs to be performed is
Let’s look at the SQL for generating a list of read-only forms now.
select o.object_name form_name, f.form_opt ,CASE (mod(f.form_opt,power(2,18))-mod(f.form_opt,power(2,17)))/power(2,17) when 0 then 'write' when 1 then 'read-only' end &amp;quot;Form ReadWrite Property&amp;quot; from hsp_form f left outer join hsp_object o on (f.form_id=o.object_id) where o.object_name like 'Actual vs Plan%';
You can run this for entire Planning application and find out which forms are read only
Let’s look “Operating Expenses – Forecast” form,
Now let’s find out which forms are hidden in the system.
FolDifference is 8388608 and exponent is 23
select o.object_name form_name, CASE (mod(f.form_opt,power(2,24))-mod(f.form_opt,power(2,23)))/power(2,23) when 0 then 'Visible' when 1 then 'Hidden' end &amp;quot;Form Hidden/Visible&amp;quot; from hsp_form f left outer join hsp_object o on (f.form_id=o.object_id) where o.object_name like 'Operating Expenses - Forecast%';
Let’s run the SQL and find out
Now let’s run it for all the forms
If you look at the SQL and the forms under Forecast folder (Vision application) you’ll see that the SQL results tie with the screen shot below.
Now that solves the decoding issue of FORM_OPT (now how that big of a number is generated is going to be a different blog post)