13 Replies Latest reply: Jun 28, 2013 7:45 AM by Peddi RSS

    Masking a bank account

    user10595034

      How can you display just the last digits of a bank account. For example 123456789 is display as ******789.

      Can this be done through personalizations?

       

      Thanks

        • 1. Re: Masking a bank account
          Sandeep M.

          Hi,

           

          You need to have VO extension to add another column with this display value and then use new column in standard page through personalization.

           

          Regards,

          Sandeep M.

          • 2. Re: Masking a bank account
            user10595034

            Hi Sandeep

             

            Thanks for getting back - we are looking to secure this for certain responsibilities. Would ylour solution suffice or am I looking at a controller extension piece of work?

             

            Thanks

            Satpal

            • 3. Re: Masking a bank account
              Sandeep M.

              Hi Satpal,

               

              You can achieve that also with above approach.

              Just control this new column value based on current responsibility (you can make use of fnd_profile.value('RESP_ID') or fnd_profile.value('RESP_NAME') in your query).

               

              Regards,

              Sandeep M.

              • 4. Re: Masking a bank account
                Peddi

                For your problem, the best way to go is Controller extension. This way, you have an option to set the controller at any level(including Responsibility, site etc) based on the current and future needs.

                If you go for VO extension for your future requirements there is a chance that the extended VO needs to be changed. So I guess controller extension is viable here.

                 

                Regards,

                Peddi.

                • 5. Re: Masking a bank account
                  Sandeep M.

                  Hi Peddi,

                   

                  I just wanted to understand how controller extension will be better in this case.

                  Hope you wont mind

                   

                  1. Controller extension can disturb standard code flow.

                  2. For future requirements even controller code will need to be modified and that will be more complex than to modify a plain SQL.

                   

                  Only positive side I see is you can set the controller at any level using personalization but that too comes with cost of writing more code to achieve this requirement and risk of affecting standard code flow.

                   

                  And with VO extension if we use personalization to hide/unhide this new column we can again achieve it at any level.

                   

                  Regards,

                  Sandeep M.

                  • 6. Re: Masking a bank account
                    Peddi

                    Hi Sandeep,

                     

                    The solution I can think of for the above situation

                    1) Write a new controller by extending the seeded controller. In the new controller, don't write any code based on the responsibility. Just mask the bank account as per the needs. So this CO just do blind masking.

                    2) Now attach this new controller(using personalization) to any responsibility where you want the bank account to be masked. Even if the bank account needs to masked for any new responsibility, then simply personalize the page and add this controller at that new responsibility level.

                    This way we don't need to change any code if any new responsibility comes into picture so no code maintenance.

                     

                    Come to your questions

                    1. Controller extension can disturb standard code flow.

                    Ans) Controller extension doesn't disturb the standard code flow until unless you call the super methods properly. Controller extension adds value to the page if used wisely.

                    2. For future requirements even controller code will need to be modified and that will be more complex than to modify a plain SQL.

                    Ans) If you understand the above solution, I no need to answer this query.


                    I hope you understand my explanation. Let me know if you need any further clarification.


                    Regards,

                    Peddi.

                    • 7. Re: Masking a bank account
                      user10595034

                      Hi Sandeep and Peddi

                       

                      Many thanks for your suggestions - I'll have a look into this and let you know how I got on.

                       

                      Thanks
                      Satpal

                      • 8. Re: Masking a bank account
                        user10595034

                        Hi Guys

                         

                        What if the bank account field is displayed in a Region Table - is it the same approach?

                         

                        Thanks
                        Satpal

                        • 9. Re: Masking a bank account
                          Peddi

                          Hi Satpal,

                           

                          If that region is using same CO it's fine. If not then extend the region CO and follow the procedure as mentioned earlier.

                           

                          Regards,

                          Peddi.

                          • 10. Re: Masking a bank account
                            user10595034

                            H Peddy

                             

                            Next question - how can I get the handle to the item in the table?

                             

                            Thanks
                            Satpal

                            • 11. Re: Masking a bank account
                              Peddi

                              Please read OAF Documentation. It gives you ample information about the basic stuff like this.

                               

                              Regards,

                              Peddi.

                              • 12. Re: Masking a bank account
                                user10595034

                                Hi Peddi

                                 

                                Managed to get the handle to the item in the table but having issues overwriting the value. I have tried using item1.setValue(...) but getting the "Attribute set for Name in view object SupplierSummaryVO1 failed".

                                 

                                Any advice on how I can move fordward

                                 

                                Thanks
                                Satpal

                                • 13. Re: Masking a bank account
                                  Peddi

                                  Hi Satpal,

                                   

                                  If you want to set the masked value to a field, you are not supposed to do like this as it's a table and is based on a VO Instance.

                                   

                                  You need to loop through all rows in SupplierSummaryVO1 and set the respective attribute value so the table which is based on this VO instance will automatically display the updated values.

                                  I hope it's clear for you.Let us know if you need further information.

                                   

                                  Regards,

                                  Peddi.