Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:documentation:how_to:use:placeholder [2018/01/10 11:26]
Swaelens Jonathan [Modifiers]
en:documentation:how_to:use:placeholder [2018/12/04 09:45] (current)
Côme Chilliet [Modifiers]
Line 111: Line 111:
  ​%d[now,​l jS \of F Y h:i:s A]|%    Wednesday 15th of March 2017 02:12:18 PM  ​%d[now,​l jS \of F Y h:i:s A]|%    Wednesday 15th of March 2017 02:12:18 PM
  ​%d[today,​epoch]|% ​                From 1.3 it's possibe to use epoch date format  ​%d[today,​epoch]|% ​                From 1.3 it's possibe to use epoch date format
 +</​code>​
 +
 +=== n ===
 +
 +The modifier **n** (added in FD 1.4) can be used to generate **n**umbers.\\
 +As the **r** and **d** modifiers it should be used alone, with no attribute name.\\
 +This modifier will make sure the result value is unique for the filled field in the LDAP. The number will get as high as needed to ensure that.\\
 +First parameter is whether the number should always be there or only in case of duplicates (1 or 0, defaults to 0). Second parameter is starting number, defaults to 1. Third parameter is step, defaults to 1.
 +
 +Examples:
 +
 +<​code>​
 + ​%n|% ​          If not unique, adds a number starting at 1
 + ​%n[1]|% ​       A number starting at 1
 + %n[0, 2]|%     If not unique, adds a number starting at 2
 + ​%n[1,​10]|% ​    A number starting at 10
 + ​%n[1,​20,​10]|% ​ A number starting at 20 and going up ten by ten
 </​code>​ </​code>​
  
en/documentation/how_to/use/placeholder.txt · Last modified: 2018/12/04 09:45 by Côme Chilliet
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0