Joseph31 Posted April 4, 2006 Posted April 4, 2006 Can anyone help me fix this script. Not sure if I have the if else statements correct... See attached. Thank you Script.txt
sbg2 Posted April 4, 2006 Posted April 4, 2006 You mean something other than the fact that there are 3 If statements and only 1 End If statement? Not that its easy to decipher to begin with but without the End Ifs its impossible. You havent told us what the error is??? Are you getting an error when you try to save the Script or is it not performing the way you expect. If its not performing the way expect you might try to give just a tad more detail.
Joseph31 Posted April 4, 2006 Author Posted April 4, 2006 Oh opps, Well I did see the End if (Fixed them) but the script only run the first Half, that is the area where it says [is empty (policy notes)]... so if i check the add policy notes [not is empty] nothing happends it does not even open the email? Thank you
Vaughan Posted April 5, 2006 Posted April 5, 2006 First of all, use Set Field [] instead of Insert Calculated Result []. The ICR step requires that the field be on the current layout: it'll fail if it's not. Set Field has no such restrictions. The only time Set Field doesn;t work is when you want to enter data into the field that does not match the field type: for instance, you cannot use set field to enter "<1/1/2006" into a date field because "<1/1/2006" itself is not a valid date. In this instance you need to use ICR, but you'll also need to make sure that the field is on the layout. Most defensive prgrammers ensure this by making a layout dedicated to the task, and switch to this layout specifically for this step, then switching back (use Freeze Window to hide it).
comment Posted April 5, 2006 Posted April 5, 2006 you cannot use set field to enter "<1/1/2006" into a date field because "<1/1/2006" itself is not a valid date. Of course you can. You're thinking of version 6 and below.
Joseph31 Posted April 5, 2006 Author Posted April 5, 2006 Other than that Item (Set Field vs Insert Calc) can anyone tell me why my script does not work in the second half [not isempty] area?
Joseph31 Posted April 6, 2006 Author Posted April 6, 2006 How do you write a script with an if statement using two verables with two different outcomes. See example above. I thought the script made sense but it only works on thetop half... meaning when the script looks at the add policy note the script does not even run. Can some one help me
Lee Smith Posted April 6, 2006 Posted April 6, 2006 If [ Ck_Bx_Flag::Category = 100 ] Set Field [ Ck_Bx_Flag::Category; 200 ] Else Set Field [ Ck_Bx_Flag::Category; 100 ] End If
Joseph31 Posted April 6, 2006 Author Posted April 6, 2006 Got that one... But I need something that is like the example attached above... It has two layers... Thanks, Joseph
Recommended Posts
This topic is 6808 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