October 17, 201312 yr 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
October 17, 201312 yr 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
October 17, 201312 yr Author 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
October 17, 201312 yr You could also set a script $variable instead of a global field - it will be both faster and simpler.
October 17, 201312 yr Author 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
October 17, 201312 yr 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.
Create an account or sign in to comment