Create dataset in empty joined table
Create dataset in empty joined table
Hi,
I would like to know (since I haven't found any information on this topic) if it is possible that the editor creates a new dataset in a joined table where there are no datasets yet that match the join conditions?
Example:
Table A
Customer_ID | Customer | Address | More customer Information
Table B
Customer_ID | Revenue | Year
I dont realy want to create all the data entries in the second table if there was no revenue for a given year but still want to be able to edit all customers from Table A in an Editor.
Thanks for the info in advance
Answers
You can do nested editing, as shown in this example. When the
datatable
data type is used, you can create and amend those values in the linked table. Is that what you're looking for?Colin
Hi,
I am afraid not realy since I just want to edit the column "revenue" with inline editing in Table B and dont want a whole new editor window for editing.
To confirm my understanding, you want to inline edit the value in a joined data base row, which is shown to the end user as part of the host row?
Yes it is possible, but you must also include a hidden field in the form which contains the primary key value (or whatever value you are performing the join on - I presume that is the primary key) - use
hidden
to do that.Since you are inline editing you will also need to submit the whole row of data to make sure that hidden field gets included:
Allan
So I finaly came around to try the things you suggested. I am desperate at this point because I can't find out what the problem seems to be. The join seems to work, no problem but the value wont be written to the datatable without any error message.
I currently use this implementation (3 Tables joined on each other):
C# API Call:
JavaScript:
And the HTML Part:
Currently I can't even put any value in the "Umsatz" field (Sorry for the german in the code but it shouldn't matter)
The
submit: 'allIfChanged'
option insidekeys
isn't going to do anything. Could you instead add:to your Editor initialisation please?
Then when you submit a change, in the Ajax inspector in your browser you should see the full form's data being submitted in the request parameters.
Thanks,
Allan
It seems like the data is missing from the post data "Umsatz" is null allthough I inserted a value.
Any idea what would cause this?
Nvm. I missed a Join Column in the Datatable.
Sorry for the trouble....