locked
intercepting a column value read from the database and modifying RRS feed

  • Question

  • User-15190661 posted

    say i have a table which has a text column call "Name". i want to be able to intercept and modify the value of that field (decrypt it via a function) before it displayed on the various list and edit DD forms

    what is the best way of achieving this?

    thanks in advance

    john

    Wednesday, June 27, 2012 7:53 AM

Answers

  • User-330204900 posted

    Hi Jress, the simplest solution is to create a custom field template.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 28, 2012 8:08 AM

All replies

  • User-661350001 posted

    is the decryting logic possible in SQL Server then decrypt and return the the column in select clause

    else

    when you are adding the properties to the model assign to the property in turn it decrypts and have a porperty to get the Decrypted value

    Wednesday, June 27, 2012 9:27 AM
  • User-902516579 posted

    Hi,

    I would try and do that with a stored procedure on the database side and not on a client or webserver.  Just my 2 cents.

    HTH, Ben

    Wednesday, June 27, 2012 9:32 AM
  • User-15190661 posted

    no the decrypting cannot be done sql server unfortunately

    "when you are adding the properties to the model assign to the property in turn it decrypts and have a porperty to get the Decrypted value"

    can you give me an example?

    Wednesday, June 27, 2012 9:40 AM
  • User-661350001 posted

    public string pwd = string.Empty;

    public string epwd = string.Empty;

    public string Password

    {

    get

    {

    return pwd;

    }

    set

    {

    epwd=value;

    pwd=decrypt(value);

    }

    }

    public string EPassword

    {

    get

    {

    return epwd;

    }

    set

    {

    epwd=value;

    }

    }

    Wednesday, June 27, 2012 9:46 AM
  • User-15190661 posted

    ok thanks i'll give that a go

    Wednesday, June 27, 2012 9:58 AM
  • User-330204900 posted

    Hi Jress, the simplest solution is to create a custom field template.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 28, 2012 8:08 AM
  • User3866881 posted

    Hi Jress, the simplest solution is to create a custom field template.

    To Jress:)

    MVP has offered you a concept idea of a solution to your problem, and about how to create a Custom field in Dynamic Data, maybe you should have a look at:

    http://msdn.microsoft.com/en-us/library/cc488522.aspx

    Thursday, June 28, 2012 10:14 PM