Populating a sample

P

p4a

Hi,
I want to populate the form with sample data from main source AFTER (adding
rules with button) the user have opened the form and seen it "blank". I
manage easily in preview with secondary source, but then data don't stay
around upon submit which is needed. Have I missed something smart here?

wbr p4a
 
C

Clay Fox

My guess is that you are just displaying the sample data from the secondary
source.

In order to "put' it in your form you need to transfer the values from the
secondary data into your main data source. That way the values can be saved
and submitted with your form. Secondary data is just read-only.

--
Thanks

Clay Fox

Qdabra Software
http://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the World
http://www.infopathdev.com
 
P

p4a

Yes, you're right that when pointing to the secondary I'm able to populate,
however since I also need to bring the data forward, if not edited, I need to
find another way. The data are present in main as well (since a regular XML
is used for the controls) but I don't want them displayed when opening the
Form, only after hitting a "request" button (rule/query) i.e. it should be
optional to populate a "sample".
Hopefully that explains a little better :)

wbr
p4a
 
C

Clay Fox

Right so when they hit the sample button, you would then copy the data into
your main fields from the secondary. Otherwise if you just show them the
secondary, they would have to enter it into the main form fields themselves.
If you are doing it codeless you would use a rule on the button and actions
to set each main field to the corresponding secondary field. With code you
could set them in bulk possibly.
--
Thanks

Clay Fox

Qdabra Software
http://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the World
http://www.infopathdev.com
 
P

p4a

Thanks Clay, but "actions to set each main field to the corresponding
secondary field" is what I don't fix codeless :-( unless I use the Preview
which I wouldn't.

I.e. how on earth do I get hold of the data only from main, after the Form
is opened blank for the user?

wbr p4a
 
P

Paresh

Thanks Clay, but "actions to set each main field to the corresponding
secondary field" is what I don't fix codeless :-( unless I use the Preview
which I wouldn't.

I.e. how on earth do I get hold of the data only from main, after the Form
is opened blank for the user?

wbr p4a









- Show quoted text -

As Clay mentioned, you will need to use rules to set the values of
mail datasource fields with the output of secondary datasource.
The steps can be as follows:
Set the deault values of the main datasource to the output of secondary datasource
Set the query fields of the secondary dataconnection, if any
Query the secondary dataconnection

The main datasource fields will be assigned the values of the
secondary data connection output. Once the data is assigned to the
main datasource fields, it can be used for submission.

Do let me know, if this helps.

Thanks,
Paresh
 

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