April 4, 200619 yr Can anyone help me fix this script. Not sure if I have the if else statements correct... See attached. Thank you Script.txt
April 4, 200619 yr 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.
April 4, 200619 yr Author 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
April 5, 200619 yr 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).
April 5, 200619 yr 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.
April 5, 200619 yr Author 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?
April 6, 200619 yr Author 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
April 6, 200619 yr If [ Ck_Bx_Flag::Category = 100 ] Set Field [ Ck_Bx_Flag::Category; 200 ] Else Set Field [ Ck_Bx_Flag::Category; 100 ] End If
April 6, 200619 yr Author Got that one... But I need something that is like the example attached above... It has two layers... Thanks, Joseph
Create an account or sign in to comment