Hi,
I have created a snippet to collect important datas before injecting a medication. Some of the datas are dates. My second snippet serves as my "agenda task". I don't want to show every datas in my firsts snippet, but I want the important dates to show.
To avoid typing these dates again in my second snippet, I thought about using the clipboard fonction. I don't know how the dates copied in my clipboard could keep their fonction. My goald would be that the dates entered are still recognized in my formula that calculates when the next injection is due based on the date entered as the last injection.
This is the formula I use (sorry it's mosty in french) :
Prochaine injection prévue : {time: YYYY-MM-DD; at={=date_initiale}; shift=+180D}
Can you help me ?
Welcome to the forum @mpilote!
You can use the clipboard command in the time command.
Here is an updated version of your snippet:
{time: YYYY-MM-DD; at={clipboard}; pattern=YYYY-MM-DD; shift=+1D}
There is a new setting, pattern, which is required to set the format for the date in your clipboard.
Does this work for you?
Actually, I would like to copy 3 dates in my clipboard (I reunited them in a list).
{formdate: YYYY-MM-DD; name=date_initiale}
{formdate: YYYY-MM-DD; name=date_calcémie}
{formdate: YYYY-MM-DD; name=date_créat}
{donnees=[date_initiale, date_calcémie, date_créat]}
{=donnees}
The formula I showed you before only used one of the date. I have 2 other formulas for the other 2 dates.
In that case, your clipboard will contain dates separated by commas:
You can process the clipboard before using it, for example:
{dates=split({clipboard}, ", ")}
{time: YYYY-MM-DD; at={=dates[1]}; pattern=YYYY-MM-DD; shift=+1D}
{time: YYYY-MM-DD; at={=dates[2]}; pattern=YYYY-MM-DD; shift=+1D}
{time: YYYY-MM-DD; at={=dates[3]}; pattern=YYYY-MM-DD; shift=+1D}
If your clipboard contains this: 2026-10-01, 2026-03-10, 2025-05-05
then the output going to be:
2026-10-02
2026-03-11
2025-05-06