Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Restricting User access to data post data submission

3910382Sep 17 2020 — edited Sep 18 2020

Hi,

Hope you all have been keeping well.

We have a requirement where in the ask is to make the form content ( basically all of the form) readonly once the user submits the data. Once submitted, the user should not be able to change the submitted data set.

Is there a way to achieve this without introducing workflow? Reason being, the PBCS application is only serving the purpose of data capture to be sent to PCMCS for allocations. Hence would like to avoid workflow.

Your help/suggestions are much appreciated

Thank you !

Comments

Answer

Custom format, modify (or replace) the following rule:

less2Spaces:  :breaksBeforeComma & (

    [node+1) arg & [node) ','

  | [node+1) prm_spec & [node) ','

  | [node+1) select_term & [node) ','

  | [node+1) group_by_col & [node) ','            

  | [node+1) "ord_by_1desc" & [node) ','          

  | [node+1) table_reference & [node) ','

  | [node+1) par_expr_list[19,31) & [node) ','  -- in insert clause

  | [node-1) "expr_list" & [node) ','          -- in insert clause

  | [node^) query_partition_clause[14,21) & [node) ','

) -> {

    var node = tuple.get("node");    

    var nodeIndent = struct.getNewline(node.from);

    var offset = 2;

    if( !struct.getBoolBind("spaceAfterCommas") )

        offset = 1;

    if( nodeIndent != null )

        struct.putNewline(node.from, nodeIndent.substr(0,nodeIndent.length-offset));

}

Marked as Answer by Franco Soldera · Sep 27 2020
Franco Soldera

Thank you so much @"Vadim Tropashko-Oracle", it was spot on!

I found a similar exception when creating views:

CREATE OR REPLACE FORCE VIEW "MY_SCHEMA"."MY_TABLE"(

   "FIELD_1"

   ,"FIELD_2"

   ,"FIELD_3"

But the select in the statement is formatted correctly (after your change):

...

AS

   SELECT "FIELD_1"

         ,"FIELD_2"

         ,"FIELD_3"

...

Perhaps you can do (again) some magic?

Mikhail Velikikh

I added another OR

  | [node+1) alias_in_out_constraints & [node) ','

to the less2Spaces block:

[node+1) alias_in_out_constraints & [node) ','

less2Spaces:  :breaksBeforeComma & (

    [node+1) arg & [node) ','

  | [node+1) prm_spec & [node) ','

  | [node+1) select_term & [node) ','

  | [node+1) group_by_col & [node) ','          

  | [node+1) "ord_by_1desc" & [node) ','        

  | [node+1) table_reference & [node) ','

  | [node+1) par_expr_list[19,31) & [node) ','  -- in insert clause

  | [node-1) "expr_list" & [node) ','          -- in insert clause

  | [node^) query_partition_clause[14,21) & [node) ','

  | [node+1) alias_in_out_constraints & [node) ','

) -> {

    var node = tuple.get("node");  

    var nodeIndent = struct.getNewline(node.from);

    var offset = 2;

    if( !struct.getBoolBind("spaceAfterCommas") )

        offset = 1;

    if( nodeIndent != null )

        struct.putNewline(node.from, nodeIndent.substr(0,nodeIndent.length-offset));

}

The create view statement got formatted as follows:

CREATE OR REPLACE FORCE VIEW "MY_SCHEMA"."MY_TABLE" (

   "FIELD_1"

  ,"FIELD_2"

  ,"FIELD_3"

) AS

   SELECT "FIELD_1"

         ,"FIELD_2"

         ,"FIELD_3"

     FROM "T1"

         ,(

      SELECT "FIELD_1"

            ,"FIELD_2"

            ,"FIELD_3"

        FROM "T2"

   );

Does it fit the bill, @"Franco Soldera" ?

Franco Soldera

Magic!!! Thanks again :-)

1 - 4