Avatar of Matt Pinkston
Matt Pinkston
 asked on

SharePoint Workflow Logic (Math)

I have a small sharepoint app that is a very simple list with an entry form.  One of the fields on the screen is request date.  The issue I run into is that when the user enters a request after 9:00am ET that date cannot be today it needs to get set to tomorrow.
 
q1:  can anything be done at the screen level to disallow todays date if time > 9:00am
 
q2: if I need to do in my workflow, what is the logic to add +1 to the request date field?  so Today +1...

Thanks
Microsoft SharePointMicrosoft Development.NET ProgrammingApplication ServersWeb Languages and Standards

Avatar of undefined
Last Comment
Matt Pinkston

8/22/2022 - Mon
Jamie McAllister

In the list screen on the ribbon you should see a purple button that allows you to edit the form in Infopath.

Using Infopath you could add a validation rule to the field that runs based on a condition you specify.

Possible this could be set to a time (not specifically tried it).

If not you can also put VB in the background of the form to validate as richly as you like. No need to go near the workflow code.

Users of the form DO NOT need Infopath to use the changes you make.

http://www.bizsupportonline.net/infopath2007/infopath-basics-3-ways-validate-data-infopath.htm
Matt Pinkston

ASKER
SPD 2007 :(
Matt Pinkston

ASKER
I think it needs to be in a workflow, but not sure how to check if time is after 9:00am
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Hankinater

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Matt Pinkston

ASKER
what will the calculation return?
Hankinater

If someone creates a list item on or after 9AM, it will show the date for tomorrow, otherwise it will show todays date.  It determines the time based on the Created (date) field.
Matt Pinkston

ASKER
can one more piece of logic be added?

If the user had selected a date in the future (Today plus anything) then it would just leave the date as is.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Hankinater

What are the key field names you are concerned about?  I was under the assumption that you were keying on the time that the record was created.
Matt Pinkston

ASKER
it is a date selction field called triage date