How to put a named field on the template without binding it to the database - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How to put a named field on the template without binding it to the database

Last post 10-27-2011 10:07 AM by motmeister. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-20-2011 04:12 PM

    How to put a named field on the template without binding it to the database

     Good afternoon!

    There are times when it would be nice to somehow put a field on the template that I could change without having to bind it to the database in an SQL-based template. An example might be a custom error field that I could change the contents of under code-behind conditions. During the design phase, every time I try to add a textbox for example, it immediately prompts me for a binding. I don't see any option to NOT bind a field. Is there such a thing as unbound fields? Maybe I'm just missing something. Is there perhaps a control type that is just for this purpose?

    Dennis Schaefer

     

  • 10-20-2011 05:39 PM In reply to

    Re: How to put a named field on the template without binding it to the database

    This may be a great use of a secondary data source that is an XML file - create your XML file with the fields you need, then you can drag those onto your form.

    Another option may be an expression box (calculated value in IP 2010) - set it to the text you desire, conditionally format it for hide / display logic as needed...

    Hilary Stoupa

  • 10-27-2011 10:07 AM In reply to

    Re: How to put a named field on the template without binding it to the database

    Thanks for responding Hilary (I've previously spelled your name with two l's and I apologize!)

    I've looked at the "expression box" (calculated value). When I look at its properties, it doesn't have its own name, so I don't see how I can modify it from the code-behind (the idea is that something I do in code will affect what I want to display in the box, like an error message). Setting it up to use the contents of another field on the form means that the other field has to be named, and in a DB datasource template, that means the "other field" has to be in the database, so back to square one on that one, I think.

    The secondary data source is an option I'll look in to, although it seems like it might be complicated to change from one entry in the secondary datasource xml to another. I'll play with it.

    Thanks again for your help!

    Dennis

     

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.