In Progress

5 Javascript functions - pseudo code included

We want 5 serverless Javascript functions written. Pseudo code included below. See more notes, examples below pseudo code.

AddWidParameters(inputObjectDOT) // This call accepts a list with DOT parameters and adds to mongo

inputParametersList[], commandList[] = call matchPrefix(inputObjectDOT{}, "command") // split list into commands and everything else

if commandlist[0].value["dtotype"]='' then DTOType='defaultDTO' else DTOType=commandlist[0].value["dtotype"]

DTOobject = getFromMongo(DTOType) // get DTO definition from mongo

DTOobjectDOT=converttoDOT(DTOObject)

DTOList[], DTOIndexList[], DTOoriginalList[]=removeindex(DTOobjectDOT{})

inputList[], indexList[], originalinputList[]=removeindex(inputObjectDOT{})

inputList[], DTOList[] = call splitobjectlist(inputList[], DTOList[]])

CleanInputList[]=cleanbasedoncheckflagList([url removed, login to view], inputList[], DTOList[])

Make sure originalinputList is global

AddMaster(DTOList[],CleaninputList[])

AddMaster(DTOList[],inputList[])Make sure originalinputList is global

SortedDTOList[]=SortAttributes(DTOList[])

ParentDTOList[], ChildrenDTOList[] = SplitKeywordSet(SortedDTOList[],'attribute')

ParentList[], ChildrenList[] = splitList(inputList[], ParentDTOList[])

parentwid=MongoAddEditPrepare(ParentListDTO[], ParentList[])

Repeat until ChildrenDTOList[] is empty

if ChildrentDTOList[].value = "attribute" then

RelatedListDTO[], NotRelatedListDTO[] = MatchPrefix(ChildrenDTOList[], ChildrentListDTO[].property)

RelatedListParameters[], NotRelatedListParameters[] = MatchPrefix(ChildrenParameterList[], ChildrentListParameter[].property)

ChildWid=AddMaster(RelatedListDTO[], RelatedListParameters[])

MongoAdd -- make a new relationship wid=random, primarywid= secondarywid= relationshiptype='attribute'

ChildrenDTOList[]=NotRelatedDTOList[]

ChildrenParameterList[]=NotRelatedParameterList[]

MongoAddEditPrepare(InDTO[], InList[]) in list out object

Make sure originalinputList is global

MongoType='Add'

If InDTO[1].value = 'Attribute' then toBeAdded=deletePrefix(InDTO[])

if InDTO[wid]"" then

Check in mongo to see if the wid already exists or not, if it exists then MongoType='Edit'

else InDTO[wid]=RandomWid

If OutputList[[url removed, login to view]]="" then InParam[[url removed, login to view]]=1

If OutputList[[url removed, login to view]]= then InParam[[url removed, login to view]]=current time date

if OutputList[[url removed, login to view]]="" then InParam[[url removed, login to view]]='defaultstyle'

If MongoType = 'Edit' then callmongoedit (InDTO[]) else call mongoadd (InDTO[]) // mongo add should return wid

Return wid

getfrommongo(wid)

Hard code wid values to emulate a return of parameters

mongoadd

Hard code to return wid=some random number

Example data in TAB EXAMPLE3: [url removed, login to view]

These functions, that are referenced in the 5 functions have already been written:

Functions referenced in pseudo code have already been written:

SortAttributes - accepts flat incoming parameters, produces flat parameters

SplitKeywordSet - accepts keyword & flat incoming list, produces two flat lists

MatchPrefix - accepts keyword & flat incoming list, produces two flat lists, DTOType

DeletePrefix

RemoveIndex

SplitObjectList

splitobject -accepts two flat lists, filters one from the values of the other, returns two flat lists,…original + left overs

cleanbasedonflag-accepts flag, two flat parameter lists, returns the cleaned 'ready to add' flat list

convertodot -converts to dot notation

convertfromdot -converts from dot notation

Skills: Javascript

See more: spreadsheet javascript, spreadsheet in javascript, spreadsheet google functions, spreadsheet functions google, javascript edit code, google spreadsheet examples, mongo or, google docs status, c++ code examples, pseudo code, mongo, CCC, status code, property code, mongo random, gid key, javascript spreadsheet, written code examples, code check javascript, pseudo code code, google attribute, code status, javascript split call, property list spreadsheet, google spreadsheet code

About the Employer:
( 1 review ) Plano, United States

Project ID: #4859765

Awarded to:

Eswar87

Hi, I am interested in working on this project and can start right away. Please check PM for more details. Thank you, Regards, Eswar

$100 USD in 3 days
(15 Reviews)
4.6

6 freelancers are bidding on average $108 for this job

waqasdeveloperz

Ready to start right now. Thanks.

$105 USD in 2 days
(9 Reviews)
3.3
guiqul

I'm good at javascript, sir. hope have a chance work for you. Thanks & best regards.

$133 USD in 10 days
(4 Reviews)
3.1
jayshreeganeshha

hi javascript expert here I would like to work on your project. thanks

$100 USD in 3 days
(2 Reviews)
2.2
iMastery

We are professional JavaSript coders, can easily create your JS codes for any function you need. Let's discuss on messages

$99 USD in 3 days
(1 Review)
0.0
forbestcoder

are you sure about price range?

$144 USD in 3 days
(1 Review)
3.0
johny69

I can do it.

$111 USD in 3 days
(0 Reviews)
0.0