RE: Changing Views in Infopath form
And to think I used to hold your blog in such high esteem. ;) You can't argue with the boss though. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Culmsee Sent: Wednesday, 21 October 2009 3:58 PM To: 'ozMOSS' Subject: RE: Changing Views in Infopath form Evil? Evil? Infopath rocks!! http://www.cleverworkarounds.com/2009/03/05/why-infopath-rocks/ :-) From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Wednesday, 21 October 2009 5:09 AM To: ozMOSS Subject: RE: Changing Views in Infopath form That seems like the easiest approach based on the OOTB options. Create a checkbox at the top of the form that will set the display for the form. Better still, have two. One for View1 and one for View2 - e.g. Submit Leave Application and Approve Leave Application. You can also audience target sections of a form I believe but it's been a long time since I've had to play with that evil program. :0 From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 5:37 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Option 3) Instead of using Views, Hide and unhide Sections as necassery. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 4:11 PM To: ozMOSS Subject: RE: Changing Views in Infopath form LOL. Yes, I wish there was one like that! Only the Button control has a option like that. I cannot use a button for this though. My options are ( I imagine): 1) Create a button that's not visible, and try to create an event to press that button when the user selects the checkbox (anyone ever done this?) 2) Switch views when the user selects the checkbox (what I am trying to do programmatically) Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 4:01 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Ah or maybe i made that option up ;). Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.aumailto:cgr...@educationau.edu.au w www.educationau.edu.auhttp://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:39 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Hi You mean create a button to switch views? Unfortunately that doesn't meet what I am after.. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 2:50 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Why not just use a GUI Control Rule instead of coding it? Probally be a bit easier. Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.aumailto:cgr...@educationau.edu.au w www.educationau.edu.auhttp://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:19 PM To: ozMOSS Subject: Changing Views in Infopath form Hi All I have a InfoPath 2007 form (browser enabled) that I want to create and use two views with. I have a check box that should change the view, but I get a COM error, but nothing in the event viewer as to why. CODE: public void InternalStartup() { EventManager.XmlEvents[/my:myFields/my:group1/my:delegate].Changed += new XmlChangedEventHandler(delegate_Changed); } public void delegate_Changed(object sender, XmlEventArgs e) { this.ViewInfos.SwitchView(DelegateView); } That should work right? Kind Regards, Marko This email and any files transmitted with it are intended solely for the use of the individual or entity to whom this email is addressed. This email's contents are confidential and may contain copyright and/or legally privileged information. If you are not the intended recipient, you must not read, print, store, copy, forward or use this email for any reason. If this e-mail was sent to you in error, please notify the sender by return email, and delete this email without making a copy. Any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake. Thank you. P Please consider the environment before printing this email IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender
RE: Changing Views in Infopath form
No. Right click your check box, then go to properties, then go to Rules. Add a new Action to change views. Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.aumailto:cgr...@educationau.edu.au w www.educationau.edu.auhttp://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:39 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Hi You mean create a button to switch views? Unfortunately that doesn't meet what I am after.. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 2:50 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Why not just use a GUI Control Rule instead of coding it? Probally be a bit easier. Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.aumailto:cgr...@educationau.edu.au w www.educationau.edu.auhttp://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:19 PM To: ozMOSS Subject: Changing Views in Infopath form Hi All I have a InfoPath 2007 form (browser enabled) that I want to create and use two views with. I have a check box that should change the view, but I get a COM error, but nothing in the event viewer as to why. CODE: public void InternalStartup() { EventManager.XmlEvents[/my:myFields/my:group1/my:delegate].Changed += new XmlChangedEventHandler(delegate_Changed); } public void delegate_Changed(object sender, XmlEventArgs e) { this.ViewInfos.SwitchView(DelegateView); } That should work right? Kind Regards, Marko This email and any files transmitted with it are intended solely for the use of the individual or entity to whom this email is addressed. This email's contents are confidential and may contain copyright and/or legally privileged information. If you are not the intended recipient, you must not read, print, store, copy, forward or use this email for any reason. If this e-mail was sent to you in error, please notify the sender by return email, and delete this email without making a copy. Any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake. Thank you. P Please consider the environment before printing this email IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of Education.au except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email. This email and any files transmitted with it are intended solely for the use of the individual or entity to whom this email is addressed. This email's contents are confidential and may contain copyright and/or legally privileged information. If you are not the intended recipient, you must not read, print, store, copy, forward or use this email for any reason. If this e-mail was sent to you in error, please notify the sender by return email, and delete this email without making a copy. Any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake. Thank you. P Please consider the environment before printing this email IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of Education.au except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects
RE: Changing Views in Infopath form
LOL. Yes, I wish there was one like that! Only the Button control has a option like that. I cannot use a button for this though. My options are ( I imagine): 1) Create a button that's not visible, and try to create an event to press that button when the user selects the checkbox (anyone ever done this?) 2) Switch views when the user selects the checkbox (what I am trying to do programmatically) Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 4:01 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Ah or maybe i made that option up ;). Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.aumailto:cgr...@educationau.edu.au w www.educationau.edu.auhttp://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:39 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Hi You mean create a button to switch views? Unfortunately that doesn't meet what I am after.. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 2:50 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Why not just use a GUI Control Rule instead of coding it? Probally be a bit easier. Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.aumailto:cgr...@educationau.edu.au w www.educationau.edu.auhttp://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:19 PM To: ozMOSS Subject: Changing Views in Infopath form Hi All I have a InfoPath 2007 form (browser enabled) that I want to create and use two views with. I have a check box that should change the view, but I get a COM error, but nothing in the event viewer as to why. CODE: public void InternalStartup() { EventManager.XmlEvents[/my:myFields/my:group1/my:delegate].Changed += new XmlChangedEventHandler(delegate_Changed); } public void delegate_Changed(object sender, XmlEventArgs e) { this.ViewInfos.SwitchView(DelegateView); } That should work right? Kind Regards, Marko This email and any files transmitted with it are intended solely for the use of the individual or entity to whom this email is addressed. This email's contents are confidential and may contain copyright and/or legally privileged information. If you are not the intended recipient, you must not read, print, store, copy, forward or use this email for any reason. If this e-mail was sent to you in error, please notify the sender by return email, and delete this email without making a copy. Any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake. Thank you. P Please consider the environment before printing this email IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of Education.au except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email. This email and any files transmitted with it are intended solely for the use of the individual or entity to whom this email is addressed. This email's contents are confidential and may contain copyright and/or legally privileged information. If you are not the intended recipient, you must not read, print, store, copy, forward or use this email for any reason. If this e-mail was sent to you in error, please notify the sender by return email, and delete this email without making a copy. Any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake. Thank you. P Please consider the environment before printing this email IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may
RE: Changing Views in Infopath form
That seems like the easiest approach based on the OOTB options. Create a checkbox at the top of the form that will set the display for the form. Better still, have two. One for View1 and one for View2 - e.g. Submit Leave Application and Approve Leave Application. You can also audience target sections of a form I believe but it's been a long time since I've had to play with that evil program. :0 From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 5:37 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Option 3) Instead of using Views, Hide and unhide Sections as necassery. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 4:11 PM To: ozMOSS Subject: RE: Changing Views in Infopath form LOL. Yes, I wish there was one like that! Only the Button control has a option like that. I cannot use a button for this though. My options are ( I imagine): 1) Create a button that's not visible, and try to create an event to press that button when the user selects the checkbox (anyone ever done this?) 2) Switch views when the user selects the checkbox (what I am trying to do programmatically) Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 4:01 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Ah or maybe i made that option up ;). Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.aumailto:cgr...@educationau.edu.au w www.educationau.edu.auhttp://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:39 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Hi You mean create a button to switch views? Unfortunately that doesn't meet what I am after.. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 2:50 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Why not just use a GUI Control Rule instead of coding it? Probally be a bit easier. Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.aumailto:cgr...@educationau.edu.au w www.educationau.edu.auhttp://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:19 PM To: ozMOSS Subject: Changing Views in Infopath form Hi All I have a InfoPath 2007 form (browser enabled) that I want to create and use two views with. I have a check box that should change the view, but I get a COM error, but nothing in the event viewer as to why. CODE: public void InternalStartup() { EventManager.XmlEvents[/my:myFields/my:group1/my:delegate].Changed += new XmlChangedEventHandler(delegate_Changed); } public void delegate_Changed(object sender, XmlEventArgs e) { this.ViewInfos.SwitchView(DelegateView); } That should work right? Kind Regards, Marko This email and any files transmitted with it are intended solely for the use of the individual or entity to whom this email is addressed. This email's contents are confidential and may contain copyright and/or legally privileged information. If you are not the intended recipient, you must not read, print, store, copy, forward or use this email for any reason. If this e-mail was sent to you in error, please notify the sender by return email, and delete this email without making a copy. Any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake. Thank you. P Please consider the environment before printing this email IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of Education.au except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email
RE: Changing Views in Infopath form
Evil? Evil? Infopath rocks!! http://www.cleverworkarounds.com/2009/03/05/why-infopath-rocks/ :-) From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Wednesday, 21 October 2009 5:09 AM To: ozMOSS Subject: RE: Changing Views in Infopath form That seems like the easiest approach based on the OOTB options. Create a checkbox at the top of the form that will set the display for the form. Better still, have two. One for View1 and one for View2 - e.g. Submit Leave Application and Approve Leave Application. You can also audience target sections of a form I believe but it's been a long time since I've had to play with that evil program. :0 From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 5:37 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Option 3) Instead of using Views, Hide and unhide Sections as necassery. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 4:11 PM To: ozMOSS Subject: RE: Changing Views in Infopath form LOL. Yes, I wish there was one like that! Only the Button control has a option like that. I cannot use a button for this though. My options are ( I imagine): 1) Create a button that's not visible, and try to create an event to press that button when the user selects the checkbox (anyone ever done this?) 2) Switch views when the user selects the checkbox (what I am trying to do programmatically) Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 4:01 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Ah or maybe i made that option up ;). Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.au w www.educationau.edu.au http://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:39 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Hi You mean create a button to switch views? Unfortunately that doesn't meet what I am after.. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 2:50 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Why not just use a GUI Control Rule instead of coding it? Probally be a bit easier. Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.au w www.educationau.edu.au http://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:19 PM To: ozMOSS Subject: Changing Views in Infopath form Hi All I have a InfoPath 2007 form (browser enabled) that I want to create and use two views with. I have a check box that should change the view, but I get a COM error, but nothing in the event viewer as to why. CODE: public void InternalStartup() { EventManager.XmlEvents[/my:myFields/my:group1/my:delegate].Changed += new XmlChangedEventHandler(delegate_Changed); } public void delegate_Changed(object sender, XmlEventArgs e) { this.ViewInfos.SwitchView(DelegateView); } That should work right? Kind Regards, Marko _ This email and any files transmitted with it are intended solely for the use of the individual or entity to whom this email is addressed. This email's contents are confidential and may contain copyright and/or legally privileged information. If you are not the intended recipient, you must not read, print, store, copy, forward or use this email for any reason. If this e-mail was sent to you in error, please notify the sender by return email, and delete this email without making a copy. Any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake. Thank you. P Please consider the environment before printing this email _ IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of Education.au except where
RE: Changing Views in Infopath form
IMO, InfoPath itself is a great product. However, InfoPath Web Services (ie web based forms integrated into SharePoint) is the bane of my existence. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Darren Neimke Sent: Wednesday, 21 October 2009 4:06 PM To: paul.culm...@sevensigma.com.au; ozmoss@ozmoss.com Subject: RE: Changing Views in Infopath form OK, so that's the map for why InfoPath rocks... I bet that the map for why InfoPath sucks would still be bigger http://gfx2.hotmail.com/mail/w4/pr01/ltr/emoticons/smile_wink.gif Some of my darkest days have been spent somewhere between a SharePoint workflow and an InfoPath form! Kind Regards, Darren Neimke darren.nei...@live.com From: paulculm...@gmail.com To: ozmoss@ozmoss.com Subject: RE: Changing Views in Infopath form Date: Wed, 21 Oct 2009 12:57:31 +0800 Evil? Evil? Infopath rocks!! http://www.cleverworkarounds.com/2009/03/05/why-infopath-rocks/ :-) From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Wednesday, 21 October 2009 5:09 AM To: ozMOSS Subject: RE: Changing Views in Infopath form That seems like the easiest approach based on the OOTB options. Create a checkbox at the top of the form that will set the display for the form. Better still, have two. One for View1 and one for View2 - e.g. Submit Leave Application and Approve Leave Application. You can also audience target sections of a form I believe but it's been a long time since I've had to play with that evil program. :0 From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 5:37 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Option 3) Instead of using Views, Hide and unhide Sections as necassery. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 4:11 PM To: ozMOSS Subject: RE: Changing Views in Infopath form LOL. Yes, I wish there was one like that! Only the Button control has a option like that. I cannot use a button for this though. My options are ( I imagine): 1) Create a button that's not visible, and try to create an event to press that button when the user selects the checkbox (anyone ever done this?) 2) Switch views when the user selects the checkbox (what I am trying to do programmatically) Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 4:01 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Ah or maybe i made that option up ;). Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.au w www.educationau.edu.au http://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:39 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Hi You mean create a button to switch views? Unfortunately that doesn't meet what I am after.. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 2:50 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Why not just use a GUI Control Rule instead of coding it? Probally be a bit easier. Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.au w www.educationau.edu.au http://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:19 PM To: ozMOSS Subject: Changing Views in Infopath form Hi All I have a InfoPath 2007 form (browser enabled) that I want to create and use two views with. I have a check box that should change the view, but I get a COM error, but nothing in the event viewer as to why. CODE: public void InternalStartup() { EventManager.XmlEvents[/my:myFields/my:group1/my:delegate].Changed += new XmlChangedEventHandler(delegate_Changed); } public void delegate_Changed(object sender, XmlEventArgs e) { this.ViewInfos.SwitchView(DelegateView); } That should work right? Kind Regards, Marko This email and any files transmitted with it are intended solely for the use of the individual or entity to whom this email is addressed. This email's contents are confidential and may contain copyright and/or legally privileged information. If you are not the intended recipient, you must
RE: Changing Views in Infopath form
Yeah, true enough. When you have to do InfoPath/SharePoint integration work you always end up wishing that there was a lot more low level documentation on how things really work and behave. Kind Regards, Darren Neimke darren.nei...@live.com Subject: RE: Changing Views in Infopath form Date: Wed, 21 Oct 2009 16:31:45 +1100 From: nigel.he...@stockland.com.au To: ozmoss@ozmoss.com IMO, InfoPath itself is a great product. However, InfoPath Web Services (ie web based forms integrated into SharePoint) is the bane of my existence. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Darren Neimke Sent: Wednesday, 21 October 2009 4:06 PM To: paul.culm...@sevensigma.com.au; ozmoss@ozmoss.com Subject: RE: Changing Views in Infopath form OK, so that's the map for why InfoPath rocks... I bet that the map for why InfoPath sucks would still be bigger Some of my darkest days have been spent somewhere between a SharePoint workflow and an InfoPath form! Kind Regards, Darren Neimke darren.nei...@live.com From: paulculm...@gmail.com To: ozmoss@ozmoss.com Subject: RE: Changing Views in Infopath form Date: Wed, 21 Oct 2009 12:57:31 +0800 Evil? Evil? Infopath rocks!! http://www.cleverworkarounds.com/2009/03/05/why-infopath-rocks/ :-) From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Wednesday, 21 October 2009 5:09 AM To: ozMOSS Subject: RE: Changing Views in Infopath form That seems like the easiest approach based on the OOTB options. Create a checkbox at the top of the form that will set the display for the form. Better still, have two. One for View1 and one for View2 - e.g. Submit Leave Application and Approve Leave Application. You can also audience target sections of a form I believe but it’s been a long time since I’ve had to play with that evil program. :0 From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 5:37 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Option 3) Instead of using Views, Hide and unhide Sections as necassery. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 4:11 PM To: ozMOSS Subject: RE: Changing Views in Infopath form LOL. Yes, I wish there was one like that! Only the Button control has a option like that. I cannot use a button for this though. My options are ( I imagine): 1) Create a button that’s not visible, and try to create an event to press that button when the user selects the checkbox (anyone ever done this?) 2) Switch views when the user selects the checkbox (what I am trying to do programmatically) Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 4:01 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Ah or maybe i made that option up ;). Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.au w www.educationau.edu.au From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:39 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Hi You mean create a button to switch views? Unfortunately that doesn’t meet what I am after.. Regards, Marko From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Chris Grist Sent: Tuesday, 20 October 2009 2:50 PM To: ozMOSS Subject: RE: Changing Views in Infopath form Why not just use a GUI Control Rule instead of coding it? Probally be a bit easier. Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.au w www.educationau.edu.au From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:19 PM To: ozMOSS Subject: Changing Views in Infopath form Hi All I have a InfoPath 2007 form (browser enabled) that I want to create and use two views with. I have a check box that should change the view, but I get a COM error, but nothing in the event viewer as to why. CODE: public void InternalStartup() { EventManager.XmlEvents[/my:myFields/my:group1/my:delegate].Changed += new XmlChangedEventHandler(delegate_Changed); } public void delegate_Changed(object sender, XmlEventArgs e) { this.ViewInfos.SwitchView(DelegateView); } That should work right? Kind Regards, Marko This email and any files transmitted with it are intended solely for the use of the individual or entity to whom
RE: Changing Views in Infopath form
Why not just use a GUI Control Rule instead of coding it? Probally be a bit easier. Chris Grist ICT Systems Support Manager Education.au Limited Level 1, 182 Fullarton Road DULWICH SA 5065 p +61 8 83343291 f +61 8 83343211 e cgr...@educationau.edu.aumailto:cgr...@educationau.edu.au w www.educationau.edu.auhttp://www.educationau.edu.au/ From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Marko Salonen Sent: Tuesday, 20 October 2009 3:19 PM To: ozMOSS Subject: Changing Views in Infopath form Hi All I have a InfoPath 2007 form (browser enabled) that I want to create and use two views with. I have a check box that should change the view, but I get a COM error, but nothing in the event viewer as to why. CODE: public void InternalStartup() { EventManager.XmlEvents[/my:myFields/my:group1/my:delegate].Changed += new XmlChangedEventHandler(delegate_Changed); } public void delegate_Changed(object sender, XmlEventArgs e) { this.ViewInfos.SwitchView(DelegateView); } That should work right? Kind Regards, Marko This email and any files transmitted with it are intended solely for the use of the individual or entity to whom this email is addressed. This email's contents are confidential and may contain copyright and/or legally privileged information. If you are not the intended recipient, you must not read, print, store, copy, forward or use this email for any reason. If this e-mail was sent to you in error, please notify the sender by return email, and delete this email without making a copy. Any confidentiality or privilege is not waived or lost because this email has been sent to you by mistake. Thank you. P Please consider the environment before printing this email IMPORTANT: This e-mail, including any attachments, may contain private or confidential information. If you think you may not be the intended recipient, or if you have received this e-mail in error, please contact the sender immediately and delete all copies of this e-mail. If you are not the intended recipient, you must not reproduce any part of this e-mail or disclose its contents to any other party. This email represents the views of the individual sender, which do not necessarily reflect those of Education.au except where the sender expressly states otherwise. It is your responsibility to scan this email and any files transmitted with it for viruses or any other defects. education.au limited will not be liable for any loss, damage or consequence caused directly or indirectly by this email. ___ ozmoss mailing list ozmoss@ozmoss.com http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss