Trouble with retrieving field value and update value

I wrote some code that works to push to another site... but something really basic I am having trouble with..

I just want to do if field.value != value, then button text is X, else its XY.

But the basic problem is I can't even get the field value to show up in an alert. I get 'undefined'. What am I missing? Something simple.

$(document).on('knack-scene-render.scene_3', function(event, scene, view) {
//check to see if quote already submitted
// if (condition) {
// block of code to be executed if the condition is true
//}
alert($('#view_4.field_38'.val()));
$('#view_4 .view-header').after('<div style="padding:15px"><a href="#" id="webmerge" class="kn-button">Send Quote</a></div>');

So the second thing I want to do is after the form is submitted update a date field with the current date, and update the previous field to be a different value also. What is the correct was to do this? This

//change status to submitted
// field_38:"Bid Submitted";
//get current date
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();

if(dd<10) {
dd = '0'+dd
}

if(mm<10) {
mm = '0'+mm
}

today = mm + '/' + dd + '/' + yyyy;

// field_44:today;

alert($('#view_4.field_38'.val()));

should be

alert($('#view_4.field_38').val());