Switch view based on date - InfoPath Dev
in

InfoPath Dev

Switch view based on date

Last post 10-08-2008 12:58 PM by Stryker007. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-19-2008 01:11 AM

    • PhilipLuke
    • Not Ranked
    • Joined on 11-16-2006
    • United Kingdom
    • Posts 7

    Switch view based on date

    Hi, I am trying to work out how to change the opening view based on a date. I need to be able to show a specific view if the date today is greater than a specific static date. I realise that this needs to be an expression and it needs to be a rule in the 'Open Behaviour' option in the Form Options; but I cant work out the expression for the condition? Can anyone please help on this? I have tried this 'If (today()) >= "23/09/2008" but this causes an error. I have tried to find the answer in this site and Goggled it, but no luck. I guess this is because it is a simple answer than no one has blogged about it :-(

    Thanks for any help.

     Phil

  • 09-19-2008 02:03 AM In reply to

    Re: Switch view based on date

    Hi,

    Use the following expression in the Open behavior rule in FormOptions.

    msxsl:string-compare(xdDate:Today(), "2008-09-23") >= 0

    For that follow the below steps.

    1.       Open the form in design mode.

    2.       Go to Tools -> FormOptions->Open Behaviour->Rules.

    3.       Place the above expression as condition in the ‘Rules for Opening Form’ window.

    4.       Set the Action to switch view and select the view whichever you need.

    Hope this will help to you.

     

    Swathip
    www.ggktech.com
  • 09-20-2008 01:19 AM In reply to

    • PhilipLuke
    • Not Ranked
    • Joined on 11-16-2006
    • United Kingdom
    • Posts 7

    Re: Switch view based on date

    Thank you verymuch for this. Is there a site that has examples of these types of expressions? I have tried to find some but havent been lucky yet. Thank you again for your help and answer on this.

    Phil

  • 10-01-2008 06:03 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Switch view based on date

    Hi,

    Here is some samples for xpath related examples.

    http://blogs.msdn.com/infopath/archive/tags/Formulas+and+XPath/default.aspx

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 10-08-2008 12:58 PM In reply to

    Re: Switch view based on date

    So is it possible to determine whether the document is checked out and if it is - open it in a particular view?
    Filed under: , , ,
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.