0

I have a requirement to add a temporary field in a data table. There are two types of fields you can add in data table. One is DATA fields which are actual fields, and Second is COMPUTED fields which have some limitations (not discussing here).

Let me explain my scenario, I have a table with fields Qty, Rate and Amount. Now I need to add one more field like InputRate which will be just a temporary field, do not have any role in the database. Why I need this is, I need to input rate let say in US Dollar, then then I have to convert this to my own currency say SAR. So I want that this temporary field will not save in database, but the actual one (the rate converted to SAR) will be stored.

We can do this easily in .Net windows Applications or Web Applications. But how can we do this in MS Lightswitch, because it will not allow to add fields on screen untill it is part of the data table. Even if you add a custom field (as I experiment) only on the screen, then it is going to repeat the same field's value for all rows (since my this table is DETAILS table). Means if my table has 5 rows, and in 6th row if I enter anything in custom field(with scope only on screen) then it is showing the same value of all other rows also, e.g. if I entered, then all other rows start also displaying the same value 10.

Any idea how to do this?

M_Idrees
  • 2,080
  • 2
  • 23
  • 53
  • That is what [computed properties](https://msdn.microsoft.com/en-us/library/Ff852066.aspx) are for. Is there a reason you reject them as an option? – Mitch Sep 12 '15 at 06:54
  • Computed fields do not allow user INPUT. I need user input in these temp fields. – M_Idrees Sep 12 '15 at 06:57
  • This is possible - please confirm which of the two client options you are working with (the Silverlight or the HTML client) and I'll provide some details. – Chris Cook Sep 26 '15 at 12:29
  • I am using Silverlight client – M_Idrees Sep 28 '15 at 09:24

0 Answers0