I'm having trouble calling the field data in some javascript.
Basically I need:
videoFilename = 'Name that user puts into Video Name field'
I thought perhaps i could just add it like in a workflow, but i'm not seeing an option for that.
I'm having trouble calling the field data in some javascript.
Basically I need:
videoFilename = 'Name that user puts into Video Name field'
I thought perhaps i could just add it like in a workflow, but i'm not seeing an option for that.
Have you tried checking the XML via REST?
http://contoso.com/_api/lists/getbytitle('Listname')/items
Then you should get the XML output and can check what the column is called. e.G. I get my Attachment Url and Attachment Description like this:
<script type="text/javascript">
$(document).ready(function() {
// Rest URL
var requestUri = "/_api/lists/getbytitle('Marketplace')/items?$select=Title,ID,Attachments,AttachmentFiles&$expand=AttachmentFiles";
$.ajax({
url: requestUri,
type: "GET",
headers: { "ACCEPT": "application/json;odata=verbose" },
success: function (data) {
$.each(data.d.results, function (i, item){
var title = item.Title;
var id = item.ID;
var attachmentUrl = item.AttachmentFiles.results[0];
//alert(attachmentUrl.FileName);
//alert(attachmentUrl.ServerRelativeUrl);
})
},
error: function () {
alert("Error getting the Marketplace Items");
}
});
});
</script>
Maybe this will help you to get your Video filename.
I ended up finding it by searching the nearest td.
var videoFilename = $('h3:contains("Video Filename")').closest('td').next('td').text().trim(),