2

While harshal's answer is on the right track, there is a problem in the code posted there (at least at the time of my writing this). But maybe it would help to understand a bit more what is going on. When you loop through your results and do $(#ckDepartments).append(), you are inserting HTML into a wrapping container (presumably a div?) with the id of ...


2

I don't think this has anything to do with SharePoint. The correct way to get the "value" of a checkbox (i.e. whether it is checked or not) using jQuery is $('#cbAttending').prop('checked') // will output true if checked, false if unchecked or (the older way) $('#cbAttending').is(':checked')


1

The value of the departments field should be any array of the names of the selected departments. function insertDepartments() { var selectedDepartmentNames = []; var selectedCheckboxes = jQuery(".form-check-input:checked"); $.each(selectedCheckboxes, function (index, checkbox) { selectedDepartmentNames.push(checkbox.value); }); ...


1

Try the below code provided your Departments field is a choice field. function insertDepartments() { var selectedArray = []; $.each($("ckDepartments > input[type='checkbox']:checked"), function(){ selectedArray.push($(this).val()); }); var item = { "__metadata": { "type": "SP.Data....


1

You need to convert the date string you are using in comparison to Date object for correct comparison. For that you need to use DATE function. Syntax: DATE(year,month,day) Try using below formula: =IF([Target_Finish]="","",IF([Target_Finish]<DATE(2019,9,30),"FY19",IF(AND([Target_Finish]>DATE(2019,9,30),[Target_Finish]<DATE(2020,9,30)),"FY20",...


1

To achieve this type of functionality, you can use Client Side Rendering in SharePoint 2013. You can use below code for the same: SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() { SPClientTemplates.TemplateManager.RegisterTemplateOverrides({ OnPostRender: function(ctx) { var rows = ctx.ListData.Row; ...


1

I can see there is a ' missing in your jQuery selector. It should be like: "Attending": $('#cbAttending').val() Also, I would suggest that before directly using .val() in data you can check what you value you are getting from it by adding it in console.log(). So that you will know what are getting from this expression. If you are not getting proper ...


Only top voted, non community-wiki answers of a minimum length are eligible