dztrucktion Posted October 17, 2013 Posted October 17, 2013 Is it possible to create a text calculation (for use in an email) that will take the value from Field A "Serial_Number", and increment the number by another field "Qty" and create a line with a carriage return for each? Basically if Serial_Number = SN and Qty = 4 that I would get a text result of SN1 SN2 SN3 SN4 I don't have any related tables, and this is simply to get the Serial into an email. Thanks! d
comment Posted October 17, 2013 Posted October 17, 2013 Why don't you do this in the script (I assume you already have a script for sending the mail), using Loop? Otherwise you will need a recursive custom function - something similar to: http://www.briandunning.com/cf/941
dztrucktion Posted October 17, 2013 Author Posted October 17, 2013 Boom! First off THANK YOU! I always seem to overlook the simplest answers! I took your advice with adding it to the loop to update my global field that I am pulling the data for - there is not need for the multiplier field because the loop is already taking care of it. I guess if anyone needs to know, I just basically appended the values as the loop was running. Set Field [LICE::Serial_List__gt ; If (not IsEmpty(LICE::Serial_List__gt); LICE::Serial_List__gt & "¶" ; "" ) & LICE::Serial_Number ] Thanks again!!! d
comment Posted October 17, 2013 Posted October 17, 2013 You could also set a script $variable instead of a global field - it will be both faster and simpler.
dztrucktion Posted October 17, 2013 Author Posted October 17, 2013 I think that the only issue with using a variable is that the Script is being triggered from another script and then passed back - the $var won't jump like that, will it? Thanks! d
comment Posted October 17, 2013 Posted October 17, 2013 You can use the Exit Script step in the sub-script to "send" the result, and the Get ( ScriptResult ) function to retrieve it in the main script. Another option is to use a global $$variable - but that's more wasteful, since it will hang around until you either kill it or end the session.
Recommended Posts
This topic is 4112 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