Concatenate fields at server level

Concatenate fields at server level

dynasoftdynasoft Posts: 446Questions: 69Answers: 3

Hi

I need to concatenate 2 fields at the server level as they need to be encrypted using a Windows encryption api.

Here's what I have:

            HttpRequest formData = System.Web.HttpContext.Current.Request;

            using (Database db = new Database(SetGetDbType2, SetGetDbConnection))
            {
                editor = new Editor(db, "ExportedData").Model<ExportedDataDBModel>();
                editor.Field(new Field("id")
                    .Set(false)
                );
                editor.Field(new Field("File1")
                    .Set(false)
                );
                editor.Field(new Field("File2")
                    .Set(false)
                );
                editor.Field(new Field("File3")
                    .Set(false)
                );
                editor.TryCatch(false);
                editor.Debug(true);
                editor.Process(formData);
                editor.Data();
            }

So values under fields File1 and File2 need to be concatenated and then encrypted under File3. Isthis possible? I'm aware that fields can be strung together under JS with render but what about at server level, maybe in a GetFormatter? Many thanks.

Answers

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin

    GetFormatter

    That's the one! It has access to the data from the whole row read from the db - full docs here.

    Allan

  • dynasoftdynasoft Posts: 446Questions: 69Answers: 3

    Thanks

This discussion has been closed.