tallboy755 Posted January 27, 2003 Posted January 27, 2003 I'm really dumb ... I've done this calculation before ... I just can't get it to work today If the current record = 0 go to "X" layout
LiveOak Posted January 27, 2003 Posted January 27, 2003 I'm not sure what you mean by "current record = 0". Do you mean "Status(CurrentFoundCount) = 0"? Or perhaps some field on the current record is equal to zero? If it is the former: If(Status(CurrentFoundCount) = 0) Go to Layout (X) Else #whatever is the alternative End If -bd
Mike D. Posted January 28, 2003 Posted January 28, 2003 Somehow I get the feeling you are looking for the script step Go to Layout[] with the layout selection being "Layout number from field" HTH, Mike
Newbies rebeccal Posted January 29, 2003 Newbies Posted January 29, 2003 Mike, Not to derail this post, if that's not what tallboy was asking about, but I actually have that issue, and I'm not sure how to move forward. I have a field (THANKYOU) that is formatted as a popup list with a number of thank you options. I'd like to create a script that looks at that field and then goes to the corresponding thank you layout. Any suggestions if you have a moment? Thanks!! Rebecca
jasonwood Posted January 29, 2003 Posted January 29, 2003 I have a field (THANKYOU) that is formatted as a popup list with a number of thank you options. I'd like to create a script that looks at that field and then goes to the corresponding thank you layout. If ThankYou = "Thank you" go to layout, thank you layout else if ThankYou = "Thank you kindly" go to layout, thank you kindly layout else if ThankYou = "Thank you very much" go to layout, thank you very much layout end if end if end if If you're just doing this for the purpose of printing, you might also want to add: Print [no dialog] Go to layout, original layout ...then this would be your printing script.
Newbies rebeccal Posted January 30, 2003 Newbies Posted January 30, 2003 Thanks! That's what I needed!
Ugo DI LUCA Posted January 30, 2003 Posted January 30, 2003 Hi Jason, working on IF scripts also right now. Cannot make a real choice from "else" and "end if". This is a good example, couldn't the script be. If ThankYou = "Thank you" go to layout, thank you layout end if if ThankYou = "Thank you kindly" go to layout, thank you kindly layout end if if ThankYou = "Thank you very much" go to layout, thank you very much layout end if Print If yes, is there a "speed" difference.
tallboy755 Posted January 30, 2003 Author Posted January 30, 2003 Sorry ... I have been out of town .... I want it to go to a layout when there are no records in the database... thats what I meant when I said "current record = 0"
Razumovsky Posted January 30, 2003 Posted January 30, 2003 LiveOak had the right answer for you: If(Status(CurrentFoundCount) = 0) Go to Layout (X) Else #whatever is the alternative End If -bd
jasonwood Posted January 30, 2003 Posted January 30, 2003 Cannot make a real choice from "else" and "end if"... is there a "speed" difference. Yes, I believe speed would be a possible advantage to nesting the If statements. The other advantage is that you can easily add another "else" as a result if none of the previous conditions were met, like an error message for example (it's more like a case statement in this way).
Recommended Posts
This topic is 7972 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now