Sound like you need another script that loops thru your records and checks if the shipping address is empty and if emtpy perfoms your script to copy billing to shipping. You could also add a perform a find on the empty shipping record then loop these records to speed up the prcoess.
Or replace field contents might eliminate the need for the loop.
Can you describe in more detail what you are trying to do with this script?
I have found the need for this type of script a couple of times.
For example, the shipping script I mentioned above.
On my customer detail laout I have a button that when pressed copies the data in the 'Invoice to' fields, to the 'shipping to' fields.
I was just wondering if I could automate this script to effect every record to save going to each one and clicking the button.
I may also have an field on my db called 'category'. This consists of a radio button set with options trade and customer. If I import records from an excel table that doesnt have a category field then I want to use a script, after the records have imported, to be somehting like this (as there is a discount field on the excel table)
IF(customers::discount ; Category = "Trade" ; "Customer")
Hope this explains. I know I probably could sort thiese oiut my adjusting my fields to calculate this but think it may be better to create a script..
Both of these operations can be done with Replace Field Contents if you use the calculation option.
though your If function example has a syntax error. I think you meant:
IF(customers::discount ; "Trade" ; "Customer")
Oh yes, you are right.. Can this be applied to multiple fields within a record? Like my invoice to shipping example?
Or Do I need to do it field by field? Thank you
You'd use one replace field contents step for each pair of fields.
OK - thank you