Values in text boxes in Repeating section + MS Groove

  • Thread starter pszczolkowskimichal
  • Start date
P

pszczolkowskimichal

Hi,
is anybody can explain how add value into textbox located in
repeating section after adding new section /non XPath function/ using
VB / JS.

I've tried to simulate discussin inside Infopath form (which I want
place in Groove) using repeating section with 3 text boxes: txt_post,
txt_when, txt_who .

The problem is I cant fill / read values in txt_who via VB/JS.

e.x:
Sub CTRL3_5_OnClick(eventObj)
Dim temp
temp = XDocument.DOM.selectSingleNode("/my:mojePola/my:group1/
my:txt_who").text
MsgBox temp
End Sub

Shows only txt_who.value inside first repeating section.
 
S

Shiva (GGK Tech)

Hello,

You want to display the all node(my:txt_who) fields data? Then you have to
follow this code,

//It will give all txt_who nodes with data

Dim txtWhoNodes = XDocument.DOM.selectNodes(“/my:mojePola/my:group1/
my:txt_who[. != ‘’]â€)

Dim txtWhoNodesData

foreach(Dim txtWhoNode in txtWhoNodes)
{
txtWhoNodesData += txtWhoNode.text
}
 
P

pszczolkowskimichal

Thanks Shiva for fast reply,
but, to be honest I'm looking for code to insert a value into txtWho
which is inside
repeating section, useing event OnAfterChange after adding new section
(discussion).

ex:
txtWho = 1

function msoxd_my_disscusion::OnAfterChange(eventObj)
{
newValue = txtWho + 1
txtWhoNodes = XDocument.DOM.selectNodes(“/my:mojePola/my:group1/
my:txt_who").text;
txtWhoNodes = newValue;
}
I want to new txtWho text was 2, then after adding new section 3 ...
 
C

Chandrakanth (GGK Tech)

Hi,
Please implement try the below code.

var valueChanged = false;
txtWho = 1;


function msoxd_my_group4::OnAfterChange(eventObj)
{

if (eventObj.IsUndoRedo || eventObj.Operation != 'Insert' || valueChanged
== true)
{
return;
}

newValue = txtWho + 1;
valueChanged = true;
eventObj.Site.selectSingleNode("my:txt_who").text = newValue;
valueChanged = false;
txtWho =txtWho + 1;
}
 
X

Xav

Sorry, I have to remove my posts becouse of email insted of nick.

Shiva, Chandrakanth thanks for hepl - I'll be back within day, maybe
2.

Xav
 
X

Xav

Sorry - I have to delete my post becouse of email instead of nick.

Shiva, Chandrakanth thanks for help - I'll be back in 1,2 day - we
well be continuate.

Xav
 
X

Xav

OK, I'm back again.
Once again.
I have:
1) repeating section (grupa1)
2) text box (txtwho) inside grupa1

I want to put into txtwho, text (via code) after adding new section:

function msoxd_my_group2::OnAfterChange(eventObj)
{
myValue = "Hello" (for every new txtwho);
????.text = myValue;
}

Any idea?
 
X

Xav

OK, I'm back again.
Once again.
I have:
1) repeating section (/mojePola/grupa1/grupa2)
2) text box (txtwho) inside grupa2

I want to put text into text boxes txtwho (via code) after adding new
section:

function msoxd_my_group2::OnAfterChange(eventObj)
{
myValue = "Hello" (for every new txtwho);
????.text = myValue;
}
Any idea?
 

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