Skip to main content

InfoPath XMLWriter - Adding Rows in a Repeating Table That Contain a Boolean Field

Came across an issue today with an InfoPath form I am working on.

In the form there is a Repeating Table that contains within it both String and Boolean Fields.

In order to make the form prettier we have created custom buttons to add a row to the Repeating Table.  These button use an XMLWriter to add a new row.

For any new fields (String or Boolean) the writer does the following to create a blank Field:

writer.WriteElementString("fieldname", myNamespace, "");

The problem I had was that if you created Boolean fields like the line above, and then tried to Submit the form to SharePoint, you receive a validation error "Some rules were not applied.  InfoPath cannot submit the form"

Turns out the Boolean Fields were failing to validate with the empty string value.  

This was solved by putting in a value that isn't used in the form for the Boolean Field:

writer.WriteElementString("fieldname", myNamespace, "0");


Popular posts from this blog

Export Group Membership From Active Directory Using Power Query

If you need to export a list of staff from an Active Directory Group, follow these steps.  Allows you to gather all the names & usernames of staff in a particular group and save the information into Excel.

Step By Step How To:
Open up Excel > Power Query TabClick From Other Sources > From Active Directory:(In Excel 2016 this is found under: Data Tab > New Query > From Other Sources > From Active Directory) screenshots from Excel 2016 on left, Excel 2010 w/ Power Query Add-on right A popup will ask you to enter your domain name.  It should already be populated with the correct information but if not, input your companies domain name & Click OK:
In the Navigator that opens up, expand your domain tree and double click group:

You should now see a list of all groups in Active Directory in the Power Query Editor:
In order to find & filter for a specific Group, Click the Down-Arrow for the 'distinguishedName' column > Text Filters > Contains...
Type the name…

HP Laserjet 1022 Printer - Can't Print on Windows 10

If you are having trouble getting your laserjet working on Windows 10, here's how I resolved the problem:

Go to Devices & PrintersFind your printer & go to Printer Properties > Advanced TabSet Driver to: HP LaserJet 1022 Class Driver & ApplyIf HP LaserJet 1022 Class Driver is not available.  download from this site: a test page.

SharePoint Online - Branding with CSS

This post is related to a larger group of posts called Migrate SharePoint to Office 365 - Planning & Steps

I've gone with a Publishing Site Collection so that I can use the 'Alternate CSS URL' in Site Settings > Master Page.

First off, thanks to the following websites which helped get me started: Here's what the end result will look like (if you have the same fonts):

Now for the CSS...

/* Design By : Brett Randall*/
/*     Design Colours: Greens/Greys/Blues */
/*     Last Modified : 28/02/2017*/
/*     Description: CSS to rebrand SharePoint Online Publishing Site Collection that is using seattle.master */

-- -…