Inserting section Programatically

D

DolceVita

Hi,

I have some problem to realize this can you give me some advice about
how to make this possible?

I code in C#

I have a repeating section in this I have repeating choice section with
3 choices possible!

In the first choice section I have a dropdown and a textbox (Text)!

In the second only a textbox (Bisher)!

The third is not use for this problem!

What I want to do is when an item is selected in my dropdown (Text
choice) find the entry in the secondary data source copy this text in
Bisher choice (I know how to do this) and insert the element directly
under. Bisher can be added or not!

In text choice section I want a button for insert a new Text section
under the last Bisher if there is one, if not under the last text
section!

What I have done:

1. Select the item (depends on dropdown choice) in the secondary data
source make like a Bisher element. What I want to know is how to insert
my Bisher directly under the Text section where the dropdown choice is
made? I know how to make with an insertBefore:

Old.insertBefore(SelectBisher, CurrentText);

2. For my button I try to make an thisXDocument.View.ExecuteAction I
try to make before a
thisXDocument.View.SelectNodes for select my node (like S.Y.M as say me
in another post) but that always send me an error!!! What I try:

thisXDocument.View.SelectNodes(Old, Old.nextSibling, "Texte_3623");

What I need to put in the two last parameter of this method? Object
varEndNode and object varViewContext?


Do you think it's a good idea? Have an idea about how to realize
this? Any help is welcome.

Thanks
 
R

renee rieser

I'm having a bit of trouble following your description, but I suspect
that you're perhaps making this more difficult than need be...eg,
perhaps this would be best solved without attempting to code the
solution.

Step back and look at the form...

Could you set up your sections the way you want them in the form and
then use conditional formatting (or rules) to determine what should
appear (or not) and when?
 
D

DolceVita

Hi,

Thanks for your help!

It's not possible to do what I want without code! How you make for
insert automaticaly a section with some text (variable) inner based on
dropdown choice all this without code?

Okay so I will try to be more clear! and ask question step by step

I have a choice section in this I have a Dropdown listebox! When I
select somethings in this Dropdown listebox I want an event that insert
me directly after another choice section. How can I achieve this?

I have found a solution for insertBefore like this

IXMLDOMNode CurrentText = e.Site.parentNode;
IXMLDOMNode SelectBisher =
oDomgetNode.selectSingleNode("/dfs:myFields/dfs:dataFields/...");
Old.insertBefore(SelectBisher, CurrentText);

How I can do for make the same things with an insert after?

What I have found is that I can make with
thisXDocument.View.ExecuteAction but my problem is that don't work
somebody say me that I need to make a thisXDocument.View.SelectNodes
for select my node and after make the thisXDocument.View.ExecuteAction.

My problem is what is the parameter that you need to set (object
varEndNode and object varViewContext). What I should put in this for
the moment I try:

thisXDocument.View.SelectNodes(Old, Old.nextSibling, "Texte_3623");

But that throw me an error!

Any Idea about how I can do
 
D

DolceVita

Ok

Like you say I have "Step back and look at the form... "

And I have found an issue I have make a button and with this I can call
thisXDocument.View.ExecuteAction without using
thisXDocument.View.SelectNodes!

But if someone can explain me how can we work with
thisXDocument.View.SelectNodes? That can be a good things!

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top