Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

So I have two list databases.

User Points User Submissions

These two databases work together. A user 'submits' for points in a status of 'submitted'/UserPoints[PendingPoints:Column] once 'approved' UserSubmission[TotalPoints:Column] points are now 'TotalPoints'

I have a work flow that does this math for me. If 'approved' CurrentUser[UserPoints]PendingPoints - CurrentItem[Points] then Add CurrentItem[Points]+TotalPoints then update list item. ^^^ This works but has this flaw...

If a user types a wrong point value it will double add... Or is the data is deleted it doesn't delete the item(s) points...

I am wanting to do a script I guess that would calculate a TOTAL colum defined by user.

Total database is 30 users.

share|improve this question

1 Answer 1

You could use the PreSaveAction to add your script.

Add an HTML Form Web Part and then add your logic to the function.

<script type='text/javascript'>
function PreSaveAction(){
//Do some stuff
}
</script>

I personally like to use JQuery to get and set values within my SharePoint pages. Here is some info on one method of how to add JQuery to SharePoint. You can also use this function to verify the inputs on the form.

share|improve this answer
    
Does not accomplish what I wanted... Still working on it and it is a little more complex than the above script. I as well am using jQuery... Any other ideas? –  TheSull Apr 20 '12 at 13:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.