modx revo tv type "of date" with a choice of only year - modx

How to make TV of type "date" with choice of a year only?
The option to enter any date of the year, and then output only "%Y" considered, it does not suit.

Your question is a little hard to understand, but I think you are asking how to only have year selection (so no month and day selection) in a date template variable. The date template variable may not work ideally for this since it wants at least a day and month.
Small Set of Known Years
One solution could be to use a ListBox Single Select template variable if you have a limited set of known years to select from. Set each year you want as an input option value. For example, for the years 2017, 2018, 2019, and 2020 you would have: 2017||2018||2019||2020
However, this wouldn't be ideal for a larger potentially unknown range of years.
Larger Set of Years
Another solution could be to use a text field template variable and use the regex validator to check if it is a valid year. A simple check such as ^[12][0-9]{3}$ would make sure the input is a 4 digit year between 1000 and 2999.

Related

Reinvoice every 12 months

Trying to create an invoice to auto populate. Have done this in VBA previously, but now the sheet is going on the cloud, and being used by Excel online so, VBA is out, unfortunately!
Trying to make a membership fee reappear every 12 months based on their start date!
I was trying around with EDATE, and got it to work on my test subject, but then realized it wouldn't work as I'm only going off the first 12 months!
Need a fresh set of eyes to give me ideas, or walk me through a simple solution (if possible)
Currently have the following, which works for the first year, then it won't!
Cell X7 = =EDATE(TODAY(),3) <----- Creates the cut off for invoicing if Membership due before then.
Cell V12 = =VLOOKUP(O12,'Youth Details'!$A$4:$H$95,8,0) <---- Returns their start date. i.e 19-Nov-2020
Cell W12 = =IF(AND(V12>TODAY(),V12<X7),"True", "False") <---- Returns if they have been with us for 9 months to 12 months and needs to be invoiced!
That works, for their first year, then the following year it won't invoice them as they've been there for 24 months.
I was thinking about expanding my VLOOKUP in cell V12, that if there membership was over 12 months ago, to add 12 to it, but got confused!
Any suggestions on where to go from here?
One way to do it might be
Figure the number of months they've been a member, like say 34.
Use the MOD() modulus function with a divisor of 12 (months). This will discard the number of whole 12-month-periods (years) they've been a member and leave you with just the number of months since their last anniversary. So for 34, it'd give "10" months since their 2-year anniversary.
If the answer from #2 says they're getting close to renewal, like they're 9+ months in to their current membership year, invoice them.
Cell V12: =VLOOKUP(O12,'Youth Details'!$A$4:$H$95,8,0) <---- Returns their start date, like 1-Jan-2019
Cell V13: =DATEDIF(V12, TODAY(), "M") <---- Total # of months they've been a member, like 34
Cell W12: =IF(MOD(V13, 12) >= 9, "True", "False") <---- Returns if it's been 9+ months since their last anniversary and they need to be invoiced!
Of course, if you allow people to prepay, then like AakashM points out it's worth making sure you're not invoicing them for something they've already paid.

Power Automate: Send reminder out 3 months in advance

I have a Microsoft List that has a column called Expiration Date (text in format of MM/DD/YYYY) and Point of Contact (text in format of email#domain.com). How do I create a flow that sends an email out to the Point of Contact 3 months in advance?
My idea was to create a scheduled cloud flow that:
Repeats every day
Looks at every row in specific list
Compares if Expiration Date - 3 Months = Today
If True, send email to Point of Contact
I am currently stuck on step 3 to compare the date. I did Subtract from time to subtract 3 months from Expiration Date but now I do not know how to use this value to compare to today's date.
A better approach is to filter the list by using an OData filter. That will result in a list with all the elements you need.
For doing so, you need to specify the "Filter Query" field (in red):
First type
ExpirationDate eq ''
Then, between the quotes, add an expression, and select the functions addDays and utcNow in the following way:
addDays(utcNow(),92,'MM/dd/yyyy')
Please notice the following:
I'm adding 92 days to get the same day three months in advance for today (today is Oct 18th, so I'm looking for Jan 18th). Maybe adding just 90 days would work for you.
If you just want to add 3 to the month, you would need to get today's date to a variable with utcNow('MM') to get only the month, add 3 to it, and then create the expression accordingly.
I'm sorry the UI is in spanish. I'm from Mexico. But it's the same idea.
In the image, it reads "ExpirationDateText" because that's the way I named the field in my example. In your case, "ExpirationDate" should work.

Excel interprets date entered differently among many users

I have a file with columns configured to format dates as yyyy/mm/dd. It's a shared file with a small team. Whenever I type "January 13" in a cell in the column, it returns a value of 2018/01/13, which is what the team wants. However, when my other colleagues enter the same "January 13" in that column, it returns a 2013/01/01 value. It's like Excel is interpreting the "13" as the year on his/her unit. We all use the same 2013 version and same computer model/type/brand.
What we tried so far:
-Comparing Excel applications to ensure the same configurations
-Saving the file as .xlsx instead of .xls
-Redoing the sheet into a new one
-Closing and opening the sheet
Yet none still worked. We hope to not go on the option of typing the whole date (January 13, 2018) as we somehow our fingers are dexterously trained to typing just January 13. Any insights on this please? Thanks! :)
The problem is in the Windows Regional Short Date settings.
If the short date settings are a variation of MDY, Excel will interpret your input(spelled out month and digits) as MD
If the short date settings are a variation of DMY; Excel will interpret your input as MY
In both cases, the Month is unambiguous. The short date format then interprets the digit based on the token following the Month token.
You will also see different results if you enter dates such as 1-12 vs 1-13 in the different environments.
If changing the short date settings is not an option (and the settings involved are MDY and DMY), one fix would be to always enter the dates as dd mmmm (13 January) as that would be interpreted as Jan 13, current year in either environment.
I would select all the cells/rows/columns that have dates and customize the format. Go to Home>Number and click on the dropdown (it might say "General" or "Short Date" or something). Click on "More Number Formats" and go to "Custom". In the cell under "Type:" put yyyy/mm/dd . Any way you type the date it should come out the same now. Either way, typing in number format should be easier than typing the month name.

Generate current year using Docusign formula tag

I'm currently working with Docusign and developing a form so that the current year and next year populates under the title like so:
2017-2018
These years would require two separate formulas,one to calculate the current year and one to calculate the following year. I don't want anything but the year to be generated.
The formula tab does not support displaying just the year.
See the list of formulas supported here.
Instead you can use a Text Tab and set the value "2015-2016".

Excel spreadsheet with maths

hi i am having trouble with working out this problem i have been given on excel, i am new to it so please could somebody help me :)
here is the question
A company has an asset valued at £4000 which it believes will lose 5% of its value each year. Create a spreadsheet to show the value of the asset each year for 12 years and the corresponding amount of depreciation.
Ensure that your spreadsheet allows you to change the initial value of the asset and the
depreciation rate easily.
Use the IF-function to allow you to specify the number of years to list in the table.
If A1 contained the 4000 and A2 contained the percentage of depreciation then a formula for the end of that year could be A1/100*(100-A2). Hopefully that makes sense and you have that part and are just unsure on the IF-statement part. Basically what they are asking is to enclose the formula above in an IF that asks if the years are less than those allowed (which you would specify as the question states)
How to use IF - http://www.exceltrick.com/formulas_macros/excel-if-statement/

Resources