Check empty fields before Submit

Some of you might shiver now, but this blog post is about InfoPath! Yes! That old form application  I still think it’s good though for on-prem customers who don’t have PowerApps available. I built a form that I needed to validate before the user press “Submit” and the validation is to check if mandatory fields has …

Substring in InfoPath

To get a value AFTER a charactersubstring-after(FieldName, “;”)This will return all text after the character ; To get a value BEFORE a character substring-after(FieldName, “;”)This will return all text before the character ; Substring and Concatenate I often use Concatenate to join text from two fields. For example, the Date function now() has a “T” between Date …

Working with Date formats in InfoPath

To extract the day number of a date number(substring(DateField, 9, 2)) To extract the month number of a datenumber(substring(DateField, 6, 2)) To extract the year number of a datenumber(substring(DateField, 1, 4)) Calculate hours addSeconds(now(), 7200) Get the month name from a date (and time) field =TEXT([DateField];”mmmm”) Get three characters of the month name=TEXT([DateField];”mmm”) Sort or group …

Form has been closed

This post is more for my own memory, since I tend to forget how I solved it when I get this message “Form has been closed” when submitting browser forms in InfoPath 🙂 Scenario is the following:You have a mail view that you wish to mail instead of the default Edit form, so that you …

Stop running this script

If you connect a secondary data source to your InfoPath form, and connect to a udcx file which contains a large amount of data: then you might get this error message inside the form: Very irritating! I did not find any solution to it, only that you can disable the script debugger in IE, but …