Invisible calculated field?? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Invisible calculated field??

Last post 06-04-2019 04:51 AM by zakaria.botros. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-30-2019 12:27 PM

    Invisible calculated field??

    Is it possible to create a calculated field that is not bound to a text box but will still function?

    I have a need to do some complex math using a bunch of number entries in an InfoPath form, but the results are only used in a specific SharePoint list View. I do not need it to show in the form itself.

    My first thought was just adding a Calculated Column to the SharePoint list. This worked fine and dandy, but I didn’t realize till later that any time I tweak the InfoPath form and publish it, it blows away any custom columns I made directly in SharePoint. So instead of re-creating these every time I thought I’d just add a Calculated Field in the InfoPath form, but it seems to do nothing in the list (always blank), so I assume it must be bound to a text box to work. My last thought was binding it to a text box and putting it in a lone section that was always hidden, but I am having trouble finding Rule conditions that are always false (or true) no matter what, so that it is never visible.

    Any thoughts on a way out of this conundrum? I’d prefer to not have it in the form at all, but if I must, anyway to make it permanently invisible?
  • 05-30-2019 12:37 PM In reply to

    Re: Invisible calculated field??

    If you need the data promoted (i.e., showing in your form library) then you need it be a field in the form's data source. But you can have a field in the data source that doesn't show on the form. in the data source task pane, right click the group where you want the field, select Add, then add your field. Promote it to your library when you publish. If you want to always hide something on a form, in the first dropdown for the conditional format, select "the expression". In the text area displayed, type the number 1. This will always evaluate to true.
    Hilary Stoupa

  • 06-03-2019 11:31 AM In reply to

    Re: Invisible calculated field??

    In addition to Hilary solution, you can create another view that will never be switched visible, because you will never give an order to make it visible, then put fields you want inside it and do rules you wich on these fields. many of forms that I do, I have a design view, where I keep background rules guns hidden to fire rules based on calculations.
  • 06-03-2019 11:43 AM In reply to

    Re: Invisible calculated field??

    Dang, that's a good idea and I hadn't thought of that! I use Views all the time, but making one with no ability to switch to it sounds like a great idea.

    Giving it a try now.
  • 06-03-2019 03:29 PM In reply to

    Re: Invisible calculated field??

    Well, it appears to be a "kinda" solution. I didn't think about this but it seems the form needs to be open for a calculated field to, uh, calculate (makes sense). All list entries made after I added the field work fine, but the older ones do not. I supposes I could open them and save them, but there are tens of thousands, so I'd prefer not to.

    I think think the final solution will be a combination of this and a calculated column in the SharePoint list. I'll just have to recreate the latter after every change. :-(
  • 06-04-2019 04:51 AM In reply to

    Re: Invisible calculated field??

    Good, about the decision where to fire your rules or condition and keep your calculated fields in the form or in SharePoint columns, it is all about timing. I mean if you want the calculations to affect the same item you can use the calculated field inside the form itself, but if this will define a certain view or hide some items or any action related to the library it self then you can use the calculated column in share point list columns. If you don't mind, please update me with the best choice you found and the scenario that made you choose this final solution.
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.