问题
I am new to adf and I am trying to provide a default value based on an sql statement to another attribute. For instance I have a table called Employee(emp_id,emp_version,emp_name...), which has a column emp_version and i want to provide a default value to emp_version with the following sql statement:
select count(emp_id)+1
from employees
In order to do this I tried to create a transient field(testEmpversionTransient) and provide an sql statement as shown below:
However I am not able to assign the value from the testEmpversionTransient attribute to emp_version attribute, any idea how it can be acheived please?
Thanks in advance
回答1:
Youre trying something like adding a default value to a certain field when entering data to your table right.
For that you don't need to change the SQL statement, all you have to do is adding the default value to the required field's placeHolder (located in the properties tab of that field)
placeholder="Default Value"
When you commit the changes to the Data Base, for that field the default value will be commited.
来源:https://stackoverflow.com/questions/48135583/how-to-assign-a-transient-value-as-a-default-value-to-another-attribute-in-view