Search
Login
Online Mooring - Web/Mobile Harbor Management and Marina Management Software for Municipalities, Marinas, Yacht Clubs
Menu
  • Home
  • Get Started
    • Choose a Harbor
    • Find Transient Space
  • Product Info
    • For Harbors
    • For Advertisers
  • Support
    • Help Wiki
    • Change Log
    • App Change Log
  • Careers

Help Wiki

  • Home Home
  • Search Search
  • Recent Changes Recent Changes
  • Show All Pages Show All Pages

Formulas

Not Rated Yet

Formulas

Not Rated Yet

There are a number of places in Online Mooring where we calculate values by evaluating a configured T-SQL expression.  These formulas are used to calculate the fees that should be charged, and to calculate dates when things should start/stop.

The formulas are in the form of a T-SQL expression, and any valid T-SQL expression is allowed.  This expression can reference any of the fields in the objects specified in the table below, which varies based on which type of calculation is being performed.  This expression can also include some non-standard T-SQL syntax, which is in the form of tags (in the form of #tagname#) that get replaced with values from the database prior to executing the T-SQL expression.

At the moment, tag recursion is only partly supported.  This means that things may not work if you specify a tag that ends up getting replaced with another similar tag.  For example, if you wanted the FeeFormula for a Renewal Submitted action to be the same as the FeeFormula for the Application Submitted action, and the FeeFormula for the Application Submitted action specified to use the FeeFormula for the Wait List Submitted action, it wouldn't work.  The expression passed to SQL would be the formula exactly as it appears on the Application Submitted action.

We replace the tags in the order shown in this grid below.  This means that if the tags in one row end up getting replaced with tags from any other row further down in the table, it'll be fine.  But if the tag ends up getting replaced with a tag from that same row or one further up in the table, it won't get replaced.

 

Item

ConfigurationAction
(StartDateFormula, EndDateFormula, FeeFormula, HostingFee, AdvertisingFee, RevenueShare, FeeHelpFormula)

ConfigurationActionFee
(FeeFormula, FeeHelpFormula)
BerthGroup
(WaitListFeeFormula, RentalFeeFormula, Item1FeeFormula, WaitListFeeHelpFormula, RentalFeeHelpFormula, Item1FeeHelpFormula)
BerthGroupAmenity
(FeeFormula)
ConfigurationPermitTypeSituation
(AllowWhenTrue)
Where calculation is performed p_Permit_GetCompleteDataPlusUserFormulas3 p_Permit_GetCompleteDataPlusUserFormulas3 p_Search_Rental8 and
p_Permit_GetCompleteDataPlusUserFormulas3
p_Search_Rental8 p_PermitTypeSituation_Allowed2
Objects includes in from/join clauses fnPermitAll3 (alias P)
tblPermitAction (alias PA)
fnPermitAll3 (alias P)
tblPermitAction (alias PA)
None None None

tblConfigurationAction tags

#ca.<ActionName without spaces>.<column name>#

Example:  to use the FeeFormula from the Application Submitted action, you'd specify #ca.ApplicationSubmitted.FeeFormula#

Yes Yes No (p_Search...) / Yes (p_Permit...) No No

tblConfigurationActionFee tags

#caf.<ActionName without spaces>.<Itemized Fee Name without spaces>#

Example:  to use the FeeFormula from the Application Submitted action, you'd specify #ca.ApplicationSubmitted.FeeFormula#

Yes Yes No (p_Search...) / Yes (p_Permit) No No

tblBerthGroup tags

#bg.<Berth Group Name without spaces>.<Columnname>#

Example:  to use the RentalFeeFormula from the T1 berth group, you'd specify #bg.T1.RentalFeeFormula#

Yes Yes Yes Yes No

tblFeeVariable tags

#var.<VariableName>#

Example:  to use the PermitFee variable, you'd specify #var.PermitFee#

Yes Yes Yes Yes Yes
Other tags None None

Values entered on transient search page:
#AppStartDate#
#AppEndDate#
#BoatUsage#
#BoatType#
#NumVessels#
#MaximumLength#
#LengthInFeet#
#BeamInFeet#
#DraftInFeet#
#Displacement#

Calculated values:
#AppStartYear#
#AppDurationInYears#
#AppDurationInQuarters#
#AppDurationInMonths#
#AppDurationInHours#
#SearchDate#

Other:
#BerthGroupID#

Same as previous column

#PermitTypeID#

#now#

 



  Rating
Rate This Page: Poor Great   |  Rate Content |
Average rating:  No Ratings Yet   
Number of Ratings : 0
  Comments
Add Comment
No Comments Yet


View Topic History

About Us

Online Mooring provides web and mobile harbor management solutions to clients around the world.  We seek to reduce the cost and effort to allocate scarce harbor resources, increase harbor revenues, improve the safety of boaters and boats, and make it easier for harbor stakeholders to collaborate with each other.

Recent Posts

Contact Us

We would love to hear from you!  We are always interested in learning about your needs, and discussing a strategy to address those needs.

  76 Pratt St
Glastonbury, CT 06033  USA
  1-813-MOORING
(1-813-666-7464)

Email Us

CAPTCHA image
Enter the code shown above in the box below.
  • Submit
  • Cancel
Home Get Started Product Info Support Careers
Copyright Online Mooring LLC, 2007-2021 | Privacy Statement | Terms Of Use