Search Results for 'script'
-
Search Results
-
I would like to combine a Notes field with other in a script, but if the Notes field is empty I wish to display just the other fields.
I have created a test database with a test script as follows:
var notes_id = 'fld-9d8543d9d39f409194349c1a855d7728'; var notes = record.getFieldValue('fld-9d8543d9d39f409194349c1a855d7728'); var new_work_address_id = 'fld-943ab25fd0de42e7b8d1e5487c6a358b'; var new_work_address = record.getFieldValue('fld-943ab25fd0de42e7b8d1e5487c6a358b'); if (notes == "") { result = new_work_address } else { result = new_work_address + "\n\n" + notes; } resultBut if the Notes field is empty the result is the content of new_work_address plus plus the word ‘undefined’
Is there a way to test for whether a Notes field is empty?
Hi Brenden – Not sure if this is by design, but thought I would ask. I currently have a Trade Journal form layout that has a button which executes a script. I noticed that when I’m in a search filter and execute the script via the button click. I noticed the transaction disappears from my search filter list and I have to hit the refresh (recalc the search filter) button in order for my transaction to show up on my list again. The filter criteria for my search is based on a date/time field (looking at today transactions). The fields that I’m populating has nothing to do with the search filter so I am not quite sure why the transaction would disappear (unless it event driven). Is this the expected behavior? So to make this work, I have to click the button and then hit the recalc button for the record to reappear. I’m wording if I am doing something wrong. When I execute the script I do a form.saveallchange() for my changes to take effect.
thanks,
rocky