How to hide submit button based on calculated field? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How to hide submit button based on calculated field?

Last post 02-18-2020 11:17 PM by RegionH. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-18-2020 04:54 AM

    How to hide submit button based on calculated field?

    Hi, My form is build with. I have two calculated fields in my form for e.g. all mandatory fields is filled out or a specific text string is contained in 'Sagsnavn'. Field name is ObligatoriskeOk and maximum calculated value is 3: number(boolean(string-length(dfs:dataFields/my:SharePointListItem_RW/my:Sagstype))) + number(boolean(string-length(dfs:dataFields/my:SharePointListItem_RW/my:Ansvarlig/pc:Person/pc:DisplayName))) + number(boolean(string-length(dfs:dataFields/my:SharePointListItem_RW/my:Title))) Field name is LogiskeOk and maximum calculated value is 1: number(boolean(contains(dfs:dataFields/my:SharePointListItem_RW/my:Title, "UDBUD AF"))) If the overall sum is not equal / <> to 3 then the submit button should be hidden. It seems like it is not possible to hide submit button based on a calculated value. Is that correct? Is there a workaround? Best regards Morten
  • 02-18-2020 05:00 PM In reply to

    Re: How to hide submit button based on calculated field?

    It is possible to hide any type of a button based on a condition. Can you attach a copy of your form to a reply so I can take a look at it? Under the Options tab....
    Hilary Stoupa

  • 02-18-2020 11:17 PM In reply to

    Re: How to hide submit button based on calculated field?

    Hi Hilary, Thanks for your reply. I solved it by changing the calculated field to a text field. In the text field I set the standard value to my formula e.g. number(boolean(string-length(dfs:dataFields/my:SharePointListItem_RW/my:Sagstype))) + number(boolean(string-length(dfs:dataFields/my:SharePointListItem_RW/my:Ansvarlig/pc:Person/pc:DisplayName))) + number(boolean(string-length(dfs:dataFields/my:SharePointListItem_RW/my:Title))). Best regards Morten
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.