Mar 22, 2023 03:45 PM
I am trying to create a button to make calls and mail using URL "mailto:xyz@abc.com" but I am not able to use that. Can you suggest me something? The email address and phone number are stored in different columns.
Apr 24, 2023 05:47 AM
Hi there! I understand your concerns and will do my best to help you with your formula. Let's tackle the first problem first:
You want the 'Dato for udbetaling' to show the date of the first Wednesday after the 10th of the month when 'Betalingsmetode' is 'PBS' and the date in 'Trækdato (FarPay)' is before the 10th of the month.
To fix this, you can update the existing formula to check if the current date is before the 10th and adjust the target date accordingly. Here's the updated formula:
IF(
{Betalingsmetode} = 'PBS',
IF(
OR(
WEEKDAY({Trækdato (FarPay)}) = 2,
WEEKDAY({Trækdato (FarPay)}) = 5
),
{Trækdato (FarPay)},
IF(
DAY({Trækdato (FarPay)}) < 10,
DATEADD(
DATETIME_PARSE('10-' & DATETIME_FORMAT({Trækdato (FarPay)}, 'MM-YYYY'), 'DD-MM-YYYY'),
MOD(3 - WEEKDAY(DATETIME_PARSE('10-' & DATETIME_FORMAT({Trækdato (FarPay)}, 'MM-YYYY'), 'DD-MM-YYYY')), 7),
'days'
),
DATEADD({Trækdato (FarPay)}, MOD(10 - WEEKDAY({Trækdato (FarPay)}), 7), 'days')
)
),
...
)
Regarding the two side issues:
1) The previous formula incorrectly added days based on the current weekday value. The updated formula above should fix this issue.
2) You can use the updated formula above to ensure it jumps to the following Wednesday. It calculates the next Wednesday after the 10th of the month, regardless of the current day.
Please let me know if you need further assistance or want to move on to the next problem.