0

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.

1 Answer 1

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.

1
  • 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
    Commented Apr 20, 2012 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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