Trying to have to columns with timestamp on google sheet

105
January 10, 2020, at 4:30 PM

Column 11 is working fine (Last modified date) but column 12 (entered date) is not showing me any result help me find the problem with this code

function onEdit(e) {
     var row = e.range.getRow();  
     var col = e.range.getColumn();
if(col >= 1 && col <= 6 && row > 1){
            e.source.getActiveSheet().getRange(row,11).setValue(new Date());
            if(e.source.getActiveSheet().getRange(row,12).setValue() == ''){
              e.source.getActiveSheet().getRange(row,12).setValue(new Date());
        }
    } }
Answer 1

You use the setValue function when checking inside the if condition. I need to have getValue(). Because when you check in if you setValue(), you set the value. The result is always true or always false :)

READ ALSO
Issue regarding logging the pose object in posenet of tensorflow.js

Issue regarding logging the pose object in posenet of tensorflow.js

When I run the above code only the pose object of the last image is logged 5 times

84
async load and prepend the content of a file

async load and prepend the content of a file

I need to prepend the content of imgtphp to bb

71
Assign a role/customize HTML tooltip to PieChart/DonutChart Google Charts VueJS

Assign a role/customize HTML tooltip to PieChart/DonutChart Google Charts VueJS

I've implemented a VueJS wrapper for Google Charts called vue-google-charts and I'm looking to solve a tool tip scenario

55
SetInterval not running in Firefox when lost focus on tab/window

SetInterval not running in Firefox when lost focus on tab/window

I have a setInterval function that do countdown of time

98