Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Assistance needed on a script for a business filing system

    I am working in a google document spreadsheet to make a list of active customers. I am attempting to create a script that when a completion date is entered, that row (all the customer info) is transfered to another sheet and/or deleted. I started a script but it isn't working properly.

    function myFunction() {
    'var ssdate = spreadsheet.column B'
    // the "if" clause : if (date = 1) {
    // the "then" clause : then ( move row to sheet 2)
    }

    Since this is my first time, I am sure this needs some work, but any help would be greatly appreciated.

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Posts
    165
    Thanks
    1
    Thanked 39 Times in 39 Posts
    Can you post a link to a sample sheet (fake data is fine) but just so we can see what you are working with? Also, are you acessing this and then trying to run the script from your server? I have written many scripts for clients that do just what you are trying to do (basically archive completed jobs), however your question is a bit vague so I'm unsure as to how/where you need the calculations made and where/how you want that info stored.

  • Users who have thanked EpicWebDesign for this post:

    penntwin99 (06-13-2012)

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,589
    Thanks
    0
    Thanked 644 Times in 634 Posts
    if (date == 1)

    or even

    if (date === 1)

    should fix it. With just one = it is assigning 1 to date instead of comparing them.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    penntwin99 (06-13-2012)

  • #4
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Data

    thank you
    Last edited by penntwin99; 06-14-2012 at 07:58 PM.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •