Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2007

Tip: Looking for answers? Try searching our database.

Getting a Button to add a picture further down the form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Edward VN - 23 Aug 2007 11:34 GMT
Please would someone be kind enough to tell me how i can get a Button (when
clicked) to add a picture (user will browse for it) further down the form
Many thanks
Edward
K.Ramana Reddy(GGK Tech) - 23 Aug 2007 12:24 GMT
Hi,

You can do one thing.
when you clcik on button, set the some value for some field in dataSource
and based on that set conditional formatting(hide/show) for picture control.

Another way is: You can use check box to set conditional formatting on
picture control(when it is checked you need show the picture control
otherwise hide)

I hope this will help for you.
Signature

k.Ramana Reddy
http://www.GGKtech.com

> Please would someone be kind enough to tell me how i can get a Button (when
> clicked) to add a picture (user will browse for it) further down the form
> Many thanks
> Edward
Edward VN - 23 Aug 2007 13:58 GMT
I am sorry to be a nuisance but i am a beginer to infopath, could you be a
little more specific.

Kind Regards and thank you for your very prompt help.

Edward

> Hi,
>
[quoted text clipped - 12 lines]
> > Many thanks
> > Edward
Kalyan G Reddy MVP (GGK Tech) - 23 Aug 2007 14:36 GMT
Hello

Set to add value to a field(dummy) in datasource when the button is clicked
Basing on this value and using conditional formatting you can Hide/show the
Picture control in the below of the form. so when the button is clicked , the
value is set into this field and the conditional formatting is fired. the
hidden pictural control will be shown. now you can browse and insert a
picture.

If the button is not clicked, value is not set and the Picture control will
be hidden.

I hope it is clear now.
Signature

Kalyan G Reddy - INFOPATH MVP 2007
http://www.ggktech.com

> I am sorry to be a nuisance but i am a beginer to infopath, could you be a
> little more specific.
[quoted text clipped - 19 lines]
> > > Many thanks
> > > Edward
K.Ramana Reddy(GGK Tech) - 23 Aug 2007 14:50 GMT
Hi,

kalyan explained about button Button click, there is a another way to do this.

Place some check box into form,
see properties of check box will have by default value when cleared ="false"
and value when checked "true", you can either way.
Based on checked and unchecked you can set the conditional formatting on the
picture control.
Signature

k.Ramana Reddy
http://www.GGKtech.com

> Hello
>
[quoted text clipped - 33 lines]
> > > > Many thanks
> > > > Edward
Edward VN - 23 Aug 2007 16:50 GMT
Ok, i now understand it, i have set the check box to apply a rule based on
the value but what is the 'function' called that will allow me to browse for
and insert a picture.

Kind Regards

Edward

> Hi,
>
[quoted text clipped - 43 lines]
> > > > > Many thanks
> > > > > Edward
Edward VN - 23 Aug 2007 16:28 GMT
Thank you, how do i set the button to add a value to a field(dummy) in
datasource when the button is clicked?,

> Hello
>
[quoted text clipped - 33 lines]
> > > > Many thanks
> > > > Edward
K.Ramana Reddy(GGK Tech) - 24 Aug 2007 04:54 GMT
Hi,

Add the Dummy field in dataSource and assign the some value to t he field,
based on this you can set the conditional formatting on the picture control.

This is VB script code.
------------------------------------------
Sub CTRL6_5_OnClick(eventObj)
' Write your code here
dim x

X = XDocument.DOM.selectSingleNode("/my:myFields/my:Dummy").text="somevalue"
End Sub

This is Javascirpt code
----------------------------------------------
function CTRL1_5::OnClick(eventObj)
{
var X

X = XDocument.DOM.selectSingleNode("/my:myFields/my:Dummy").text="somevalue";

}

I hope this will help for you.
Signature

k.Ramana Reddy
http://www.GGKtech.com

> Thank you, how do i set the button to add a value to a field(dummy) in
> datasource when the button is clicked?,
[quoted text clipped - 36 lines]
> > > > > Many thanks
> > > > > Edward
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.