Sharepoint 2013 custom lists as inventory system

I have this custom list that acts as an inventory database(lookup column)enter image description here

I have this custom list to create requests of items from the image above

enter image description here

The inventory database should automatically update whenever a request is filed. For example, After filing for 10 A4 Bond Paper, it should automatically change the quantity of my inventory database to 4990.

How can I make this happen?

Sharepoint 2013 custom lists as inventory system

I have this custom list that acts as an inventory database(lookup column)enter image description here

I have this custom list to create requests of items from the image above

enter image description here

The inventory database should automatically update whenever a request is filed. For example, After filing for 10 A4 Bond Paper, it should automatically change the quantity of my inventory database to 4990.

How can I make this happen?

Build caml query in javascript in sharepoint designer

<script type="text/javascript"> $  (document).ready(function () {     var listName = "Leave Request";     var context = new SP.ClientContext.get_current();     var list = context.get_web().get_lists().getByName(listName);     var cQuery = new SP.CamlQuery();     var camlXML = "<View><Query><Where><FieldRef Name='' /></OrderBy></Query></View>";      var link = _spPageContextInfo.webAbsoluteUrl + "/Lists/Leave Request/DispForm.aspx?ID=";           cQuery.set_viewXml(camlXML);     var listitems = list.getItems(cQuery);     context.load(listitems);     context.executeQueryAsync(function () {         var count = listitems.get_count();         var enumerator = listitems.getEnumerator();        if(count > 0){             while(enumerator.moveNext()){                 var current = enumerator.get_current();                 var desc = current.get_fieldValues("Details").Description;                 var title = current.get_fieldValues("Name").Title;                 var created = current.get_fieldValues("Created").Created;                 var ID = current.get_fieldValues("ID").ID;                 var start = current.get_fieldValues("Start_x0020_Date");                 var end = current.get_fieldValues("End_x0020_Date");                  $  ("#leave-list").append("<div style=\"width:100%; margin-top:0px; border:solid 0px #e1e1e1\"><div style=\"width:100%; height:50px;; float:left; padding:3px \"><font class=\"Ndate\">" + title + "</font><br /><font style=\"font-size:9px !important; color:#ccc; \">" + start +"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -: "+ end + "</font><a style='float:right;font-size:11px;color:grey;' target='_blank' href='" + link + ID + "' >Details</a></div> </div>");             }         }         else{             $  ("#leave-list").remove();             $  ("#leave-container").append("No leaves");         }      },         function (s, a) {             console.error("Leave Widget: " + a.get_message());         }); }); 

Above is javascript Code i am using Now I want to show the data weekly employees on leave and monthly employees on leave

and here is my list structure imageenter image description here

Sharepoint (SPFx): APIs working on workbench but on modern pages the /sitePages/ path appears

I’m fairly new to the sharepoint framework so this maybe something quite fundamental that I have misunderstood but here goes:

I’m working on a sharepoint framework typescript / react webpart that uses a number of API calls which are all working on the workbench.aspx but not working when i test on sitePages using modern pages.

For example this:

import { Web, sp, SearchQuery, SearchResults, SearchQueryBuilder, Search } from '@pnp/sp'; sp.search("test").then((resultSet: SearchResults) => {     console.log(resultSet) }); 

On the workbench it works and returns my search results.

The same function on a modern page inserts /SitePages into the API call and returns a 404:

https://{server}/sites/{site}/SitePages/_api/search/postquery

I had the same problem with the currentUser web service and got round it doing this:

let spweb: Web = new Web(this.props.wpContext.pageContext.web.absoluteUrl);  spweb.currentUser.get().then(user=>{     console.log(user); }); 

This works in both workbench and modern pages but I think these are symptoms of something more fundamentally incorrect with my code.

Sorry for the lack of code shared but I’m asked not to share code by my organization.

Any tips on where I’m going wrong would be appriciated.

Error after gulp serve Sharepoint Framework

I downloaded a proj in github then i open it in VScode, run npm install, and then gulp serve, but it gives me this error

C:\Users\danielestodomingo\Desktop\react-list-form>gulp serve Build target: DEBUG C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\node-core-library\lib\JsonSchema.js:178 throw new Error(prefix + os.EOL + ^

Error: JSON validation failed: C:\Users\danielestodomingo\Desktop\react-list-form\config\tslint.json

Error: #/ (Defines configuration options for the…) Additional properties not allowed: lintConfig,useDefaultConfigAsBase,removeExistingRules,displayAsWarning at validateObjectWithCallback (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\node-core-library\lib\JsonSchema.js:178:19) at JsonSchema.validateObjectWithCallback (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\node-core-library\lib\JsonSchema.js:193:13) at JsonSchema.validateObject (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\node-core-library\lib\JsonSchema.js:175:14) at TslintCmdTask._readConfigFile (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\gulp-core-build\lib\tasks\GulpTask.js:308:28) at TslintCmdTask.onRegister (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\gulp-core-build\lib\tasks\GulpTask.js:87:32) at Object.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\gulp-core-build\lib\index.js:299:24) at SPWebBuildRig.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\sp-build-common\lib\BuildRig.js:61:19) at SPWebBuildRig.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\sp-build-common\lib\SPBuildRig.js:22:15) at SPWebBuildRig.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\sp-build-web\lib\SPWebBuildRig.js:15:15) at Object.exports.initialize (C:\Users\danielestodomingo\Desktop\react-list-form\node_modules@microsoft\sp-build-web\lib\index.js:23:17) at Object. (C:\Users\danielestodomingo\Desktop\react-list-form\gulpfile.js:6:7) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3)

I have no idea what this is and what to do.. pls help

SharePoint List column limit, item doen’t letting me edit list item

I have a list having 27 single line text columns, 7 multi line text columns, 7 Date and Time columns and 5 Person or Group columns. I was really wondering why I am unable to edit or save people picker value or multi line text columns values.

I know it doesn’t exceeded row size. But I really couldn’t understand why it is not letting me edit those columns.

Get Column Value dynamically and edit the column manually in Sharepoint Edit Form

I am creating a leave system.

There are fields like:

  1. Type of leave as text
  2. From date as date
  3. To date as date and there is a calculated column named ‘RequestedDays’ which calculates the number of leave days requested excluding weekends.

Now, I need a field in the edit form which dynamically updates to 8*’RequestedDays’ as soon as requestor enters his From date and To date.

I would also like to edit this ‘leave hours’ field manually and then submit to my manager for approval. How can I do this?

Modify or add jQuery to show unlimited entries from another lookup list from SharePoint Online

[​IMG]
0
Hello all,

I am using from a online post which you have cascading parent/ child/ grandchild list with the help of two jQuery's.

Main js.file

——————————————————————–

$ .fn.HillbillyCascade= function (optionsArray)
{
var Cascades = new Array();

var NewForm = getParameterByName("ID") == null;

$ .fn.HillbillyCascade.Cascade = function(parent,cascadeIndex)…

Modify or add jQuery to show unlimited entries from another lookup list from SharePoint Online