Hilary Stoupa
in

InfoPath Dev

Hilary Stoupa

  • DBXL Migration Tool - Handling errors with the GetListItems Method on Reshred All

    The DBXL Migration Tool uses the DBXL Document Service GetListItems method to return a list of documents when performing some actions, like Reshred All Documents (resave the XML data to the SQL database):
    DBXL Migration Tool, Reshred All

    Sometimes, the GetListItems method returns an error which will block you from being able to reshred all the documents for the document type.

    You might see an error in the Qdabra Event Log that looks like this:

    GetListItems encountered a critical error and needs attention:

    User: domain\username
    Url: /QdabraWebService/DbxlDocumentService.asmx
    System.Threading.ThreadAbortException: Thread was being aborted.
       at Qdabra.Dbxl.Implementation.ServiceImplementation.GetFieldValue(Document doc, String field)
       at Qdabra.Dbxl.Implementation.ServiceImplementation.AddRow(ListResults table, Document doc)
       at Qdabra.Dbxl.Implementation.ServiceImplementation.GetListItems(String docTypeName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, StatusInfo& info, Boolean onlyDocumentLevelAccess, String logonUser)

    The stack trace was:    at Qdabra.Dbxl.Implementation.ServiceImplementation.GetFieldValue(Document doc, String field)
       at Qdabra.Dbxl.Implementation.ServiceImplementation.AddRow(ListResults table, Document doc)
       at Qdabra.Dbxl.Implementation.ServiceImplementation.GetListItems(String docTypeName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, StatusInfo& info, Boolean onlyDocumentLevelAccess, String logonUser).

    The Migration Tool may become unresponsive after logging just one line:
    Executing action ListDomains…

    Instead of using the Reshred All Documents option on the Other Operations tab, you can use a scenario on the Custom tab:
    DBXL Migration Tool, Custom Scenario Tab 1

    Select the "ReshredDocuments.xml" scenario from the Scenario path dropdown. Click the "Load" button, then under the "Scenario runs" column on the left side, select "ReshredDocuments".

    For the docType variable, you need to enter the numeric ID for the document type. You can find that in the document type URL:
    DAT Doc Type URL

    Or on the document type's General tab in DAT:
    DAT, Document Type General Tab
    In the screenshot above, the ID for my document type is "70" as seen in the Form Template Properties section.

    The "listDocumentsMethod" variable needs to be changed from "getlistitems" to "db":
    DBXL Migration Tool, Custom Scenario 2

    Once you have configured these two variables, you can click "Run" and your documents should start to reshred.

  • Power Automate (Microsoft Flow) Demo Videos

    I've recorded a couple of short demo Microsoft Flow videos recently and wanted to add links here - I'll add more as I record more. Add a comment if there are any techniques you need a hand with!

  • Windows 10 May Update & List Form Issue

    The May update for Windows 10 appears to have caused issues with opening customized SharePoint List forms in InfoPath from the list.

    From the list, if you click on Customize in InfoPath, you may get the following error:

    The SOAP response indicates that an error occurred on the server:

    Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
    <detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">
        List does not exist.
        The page you selected contains a list that does not exist.  It may have been deleted by another user.
        </errorstring><errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/%22%3E0x82000006%3C/errorcode%3E%3C/detail>

     Nice, right? Especially since you were in the list when you clicked the button, so you know full well the list exists.

    Click Customize in InfoPath again from the ribbon and the form should open in design mode. Or, start from InfoPath Designer - New > SharePoint List > enter your server URL and select your list - that opened the list form on my system without an error. 

  • Content Type Update Issue in SharePoint 2016

    We saw an issue recently updating a content type in a SharePoint 2016 subsite. The error InfoPath returned on publish was "InfoPath has encountered an error. The operation failed. The parameter is incorrect."

    Error Dialog 

    Using Fiddler while attempting to publish, we noticed that not all content types were being returned from the library where they were stored when InfoPath queried for them. Turns out the view item limit was restricting the number of items returned to the query, so the content type we were trying to update wasn't being found:

    Fiddler Screenshot with Item Count parameter 

    Changing the default view for the library with the content type templates to include all items (i.e., increasing the item limit for the view) resolved this, and the content type could be updated successfully. In the SharePoint 2013 environment previously in use, this issue did not occur, so if you recently moved to SharePoint 2016 and have the same error updating content types - increase the default view limit and try again! 

  • FormsViewer & SharePoint List Data Connections

    If your SharePoint List or Library data connection returns an error in FormsViewer with the following text:

    No adapter found for the name <Your Data Connection Name>

    The most likely culprit is your form's compatibility! InfoPath changed the data structure for SharePoint List and Library data connections with the release of InfoPath 2010. Check your form's InfoPath version under Form Options > Compatibility. Set it to Web Browser Form (which is InfoPath 2013) and then walk through the data connection again to update the schema.

  • Why Isn't My Rule Firing?

    This is a question I see in the forums occasionally, and is something that can be confusing for beginners - so I wanted to do a quick rule review.

    Action rules in InfoPath fire when the field they are on changes. So let's look at the following scenario:

    1. You have a field called "Location"
    2. You want to set a field called "Phone" based on the selected Location

    There are several ways you could do this, depending on the structure of your form and your secondary data sources. For example, if Location is a dropdown that is populated from a secondary data source, and you can associate Location to Phone with that data source, you may want to use a default value for the Phone field.

    But you could also use a rule on the Location field to set the value of the Phone field. That rule will fire every time the Location field changes (as long as any conditions are met, of course!)

    So - let's say the location changes from My Office to Your Office. If we have a rule on the Location field to set the Phone field, the rule will fire.

    If the location changes from Your Office to blank, the rule will fire.

    If the location doesn't change, the rule won't fire. (I know, you think I'm stating the obvious - but if you are using helper fields for some logic, and have some rule that sets the field to "true" and then never set it back.... you may be continually setting the field to the same value and not seeing why your rule isn't firing!)

    If the rule is on the phone field, and you change the location, the rule won't fire. I think the confusion here often stems from the rule conditions - novice form designers may think that because a field in the condition changes, the rule will fire. This is not the case - the rule must go on the field that will be changing.

    You can also use default values when you have secondary data sources with the information you need to populate - but be careful! Defaults can auto update, which doesn't always make sense - take the following scenario:

    1. You have an Order form. When the user selects the item, the price field is populated.
    2. If you set the price with a rule (using a value from a secondary data source) that value will be stable - unless the item is changed the price won't change.
    3. If you set the price with a default, and the secondary data source changes, the price could change when the form is re-opened. That's no good, right? When the item was selected, the price was $20. Now, three months later, the order has shipped, accounting re-opens the form and the price changes to $25. Accounting will hunt you down and shout at you.  

     I've got a simple sample form here that might help with the general concepts. Download the file, right click from the downloaded location, select Design to open in Design mode. From there you can preview and try it out!

  • PowerApps User Research Panel

    Have you tried PowerApps yet? Microsoft is looking for InfoPath form designers for their research panel on this exciting new product.

    You can take a survey here to join - learn more about the panel here.

  • Repeating Table Conditional Formatting Issue

    Just a quick post to let you know about an issue I ran across recently.

    I had a repeating table in a form where some of the columns had shading. We decided to remove the column shading and go to an alternate row shading using conditional formatting. I selected the table and selected "No Fill" for the shading, then added a rule for the conditional formatting. Easy, right?

    Wrong.

    My conditional formatting never appeared to be applied.

    I reproduced this in a simple form (attached here - save the file locally, right click and select design, then preview and add rows to see the tables). 

    If a table has had its shading set, even to no fill, conditional formatting that should shade the rows won't apply.

    Here is my table where I have not set the shading:
    Table with formatting 

    And a table with the exact same condition on it where I set the shading to no fill:
    Table where formatting is not applied 

    You can recreate your table, or you can fix this in the view files. I had a lot of time already invested in my form design and had a number of tables affected, so there was NO WAY I was recreating them. Save your form as source files, and remove the background color attribute from the table cells:
    View file with background color attribute 

    I know I don't have to tell you to back up your form prior to working with form source files.... 

  • Office 365 & InfoPath Browser Form Limitations

    Since we never know what will or won't work on Office 365 on a given day, I thought I'd outline a few things that we know at this time.

    1. SharePoint Web Services (this includes REST [OData]) are blocked.
    2. Sandboxed forms (forms with code) are slow to load.

     

  • Cannot Access a Closed Stream

    I had an error on qRules SubmitToSharePointList today that succeeded creating a new item, but failed to update an existing item. The failure error was:

     Exception: Exception from HRESULT: 0x8004304D. Full error node text: Cannot access a closed Stream.

    Since the first thing I did was search online, I want to make sure I blog the resolution in this instance - we were trying to submit data to a column that did not exist. It existed when the mapping was originally created, but then was deleted and replaced with a different column. The error was hard to find because this was a large mapping to a list with a large number of columns, and because the initial submit succeeded, but the update failed.

    So - if using CAML and the UpdateListService to update an existing list item is returning "Cannot access a closed Stream", verify that all the columns you are submitting to actually exist. 

  • Let's Build Something New - Excel Surveys

    While we wait for Microsoft to announce what's ahead (more here)  I think it would be fun to start taking a look at some other tools for capturing data.

    To start with - I'd like to do a quick intro to Excel Surveys. If you aren't familiar, you can find the basics here

    Excel Surveys are created in OneDrive. If you are using Office 365, you already have OneDrive storage available. If not, the free plan includes 15 GB of storage - plenty for a spreadsheet or two.

    Once you have your OneDrive account all squared away, sign into https://onedrive.live.com/ and select Excel survey under the "New" menu:
    New Menu Options - Excel Survey

     

     A window will open with an area for a title, description, and an initial question:
    Initial Survey Window

    It is pretty and clean - pleasant to use.

    You can easily enter a title and description:
    Enter title and description

     The questions have a little settings icon you can click to edit the question, select a response type, indicate whether a question is required and even add a default answer:
    Question Settings

     Available answer types are Text, Paragraph Text, Number, Date, Time, Yes/No, and Choice:
    Available Answer Types

    Yes/No and Choice will present the user with a dropdown control when they fill out the survey. For a Choice questions you can enter the available choices in the question's settings, like you can in SharePoint List Choice columns:
    Choice answer settings

    The Question Subtitle will show up under the question - you could use that as hint or tooltip text:
    Question Subtitle

    When you are done creating your survey, you can click the Save and View button to preview it:

    Survey Save & View button

    Clicking Share Survey will bring up a page that allows you to create a link to your survey:
    Share Survey Window

    Clicking Create Link unsurprisingly does just that:
    Create Link Window

    Clicking "Shorten link" creates a short link (which again, should not be an earthshattering surprise):
    Short Link

     

     Anyone you provide the link to can take the survey. Here's what mine looks like:
    Excel Survey

     You'll see I added hint text around the date field - I'd thought that the survey might have a date picker. It did not - but it certainly let me know when I entered an invalid date:
    Invalid date - with text entered

    I'm all XML-y, so I typed in a date in my preferred format:
    Still invalid date

    It was still invalid. I finally entered it as mm/dd/yyyy and my Excel Survey settled down.

    You can't submit with invalid data. If a field marked required is blank, for example, you'll get a warning and the same pink highlighting:
     Invalid - cannot be blank

    Once all data is correctly entered, clicking submit returns a message (which, like so much of what I've shown you thus far, cannot be customized):
     Thanks message on successful submit

    Back at the OneDrive site, you can open the spreadsheet to see the data collected:
    Survey Data

    You can open it in the browser or in Excel. If you want to modify your survey, after opening the spreadsheet in the browser, you can select a number of options under the Survey button in the ribbon:
    Survey button options

    Generally, I can only see this being useful in very limited scenarios. We can't get any data from external sources.  There is some level of data validation, but no rules, no formatting, no real customization. I don't see any way to prevent someone from skewing the data by replying multiple times. However - if you need to collect simple data and need a survey that anyone can access, this may be a tool worth trying.

    If you'd like to fill out my silly survey, just to get a sense of how the various controls behave and overall user experience, feel free to take it out for a spin:http://1drv.ms/1JBtYhr 

  • The parameter is incorrect

    I keep running into the same error on a recent project - the error message is "Some rules were not applied. The parameter is incorrect."

    Message dialog

    InfoPath returns this message when you try to set a value in a data source that has not been queried - so, let's say you have a data connection that does not query on load, and you have rules that execute the data connection that have conditions on them. Sometimes the data connection is executed, sometimes it is not. If you have other rules that may set a value in a field in that data connection make sure you check for the presence of the field or group first.

  • Full Trust Forms - IP Filler Setting

    A qRules user couldn’t open the qRules full trust form for mapping to lists on his computer after installing – he was getting this error:

    InfoPath cannot open form "Form template: file:///C:\Program%20Files%20(x86)\Qdabra%20Software\Qdabra%20Rules%20Library%20(Trial%20Version)\Forms\Qdabra%20InfoPath%20to%20SharePoint%20List%20Tool.xsn The form template cannot be opened, because the system administrator has disabled opening form templates that require full trust."

    He resolved this as follows -

    Open InfoPath Filler > Form Options > Trust Center > Trust Center Settings > tick "Allow fully trusted forms to run on my computer"

    Raise your hand if you didn't know about this setting - I didn't! :-)

  • Pasting Pictures - InfoPath Makes it Easy!

    Short post - but there is something that I know that I thought everybody knew... and it turns out that may not be the case!

    Did you know that you can simply paste pictures into a picture control in InfoPath? This works in 2007, 2010 and 2013 - I don't have a 2003 machine handy to test on.

     

    You can either right click the control and select Paste or the clipboard icon (depends on version - screenshot above is from IP 2013), or if the control is selected, you can use CTRL + V to paste. Oh - and this can be either for a screenshot on your clipboard or you can copy the picture from your file system.

    Bonus - if the picture control is meant to be used with linked pictures (instead of storing the picture in the form), you can open the picture in your browser, copy it and paste it in. If you check the XML, it will contain the link - the form will display the picture.

    Have fun saving time! No more browsing the file system for you!

    EDIT: Not IPFS (browser form) compatible though - which is unfortunate!

  • qRules SubmitToSharePointList and a Person or Group Column type

    This just came up again here, and I have to admit I have to look it up myself every time it does come up! So - for future reference, if you need to submit data to a person or group column in a SharePoint list, you can submit -1;#userid with userid replaced with an actual user ID. If you need to submit multiple values, separate them with ;#

    -1;#user1;#-1;#user2

    And so on...

    SubmitToSharePointList submits CAML to the UpdateListItems method of the SharePoint Lists web service, so if you are submitting using your own custom code, or what-have-you, this will work for you too.

More Posts Next page »
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.