E
erik.lidalv
Hi there. I have a main data source that looks like this:
fo_forms (Text Boxes)
- se_settings (Repeating Table)
- go_goals (Repeating Table)
- ac_activities (Repeating Table)
I also have a secondary data source that looks exactly the same.
I have no problem filling out the form with values and save them to
the DB. The problem is when I (using a Drop-Down List Box, populated
with my secondary data source) try to load existing data into the
form. There is no problem filling the Text Boxes with existing data
(using "Rules" -> "Set field's value" on the Drop-Down List Box), but
the repeating tables won't populate using the same method, exept with
one row. I've tried using the current() expression, but I still can't
fill the tables with more than one row. This is an example of a
"filling-action" for the go_goals Repeating Table (go_Id is the
primary key and go_fo_Id is the foreign key connected with the fo_Id
in fo_forms):
Set a field's value: @go_Id = @ go_Id[@go_fo_Id = current()]
So, the question is if it is possible to achive what I'm trying to do,
simply by using rules on the Drop-Down List Box, or if I have to write
code. In that case, can someone please provide me with an example (I
prefere C#).
I'm using InfoPath 2007, SQL Server 2005.
Many thanks!!
/Erik
fo_forms (Text Boxes)
- se_settings (Repeating Table)
- go_goals (Repeating Table)
- ac_activities (Repeating Table)
I also have a secondary data source that looks exactly the same.
I have no problem filling out the form with values and save them to
the DB. The problem is when I (using a Drop-Down List Box, populated
with my secondary data source) try to load existing data into the
form. There is no problem filling the Text Boxes with existing data
(using "Rules" -> "Set field's value" on the Drop-Down List Box), but
the repeating tables won't populate using the same method, exept with
one row. I've tried using the current() expression, but I still can't
fill the tables with more than one row. This is an example of a
"filling-action" for the go_goals Repeating Table (go_Id is the
primary key and go_fo_Id is the foreign key connected with the fo_Id
in fo_forms):
Set a field's value: @go_Id = @ go_Id[@go_fo_Id = current()]
So, the question is if it is possible to achive what I'm trying to do,
simply by using rules on the Drop-Down List Box, or if I have to write
code. In that case, can someone please provide me with an example (I
prefere C#).
I'm using InfoPath 2007, SQL Server 2005.
Many thanks!!
/Erik