Skip to content

Commit 8d4ca08

Browse files
authored
Merge pull request #35 from M-Files/topic/fix-placeholder-format-example
Fixed error in Placeholders format Custom Formatting Example
2 parents 7c7297d + a0651f0 commit 8d4ca08

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • Frameworks/Vault-Application-Framework/Configuration/Placeholders

Frameworks/Vault-Application-Framework/Configuration/Placeholders/index.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,12 @@ public class Configuration
377377
[DataMember]
378378
public string TimestampFormat { get; set; }
379379

380+
// We declare our template property using generic parameters to indicate
381+
// it uses the custom environment and context we've created.
382+
// This allows the schema to include the correct list of placeholders to show in M-Files Admin,
383+
// and ensures Template.ExpandText() uses the intended settings.
380384
[DataMember]
381-
public PlaceholderTextEx Template { get; set; }
385+
public PlaceholderTextEx<FormattableEnv, FormattableContext> Template { get; set; }
382386

383387
public string ExpandPlaceholderTemplate( ObjVerEx objVerEx )
384388
{
@@ -408,13 +412,13 @@ public class Configuration
408412
// TimestampFormat: "D"
409413
// Template: "Modified: %PROPERTY_21%, Value: %PROPERTY_{PD.Value}.FORMAT_{C}%"
410414
conf.ExpandPlaceholderTemplate( objVerEx );
411-
// -> "Modified: Dienstag, 12. M?rz 2024, Value: 600,00 ?"
415+
// -> "Modified: Dienstag, 12. März 2024, Value: 600,00 "
412416
413417
// Override TimestampFormat defined in configuration/settings with FORMAT command.
414418
// (Underscores are used for spaces, literal underscores must be escaped with backslash.)
415419
// Template: "Modified: %PROPERTY_21.FORMAT_{ddd,_dd\_MMM\_yy}%, Value: %PROPERTY_{PD.Value}.FORMAT_{C}%"
416420
conf.ExpandPlaceholderTemplate( objVerEx );
417-
// -> "Modified: : Di, 12_Mrz_24, Value: 600,00 ?"
421+
// -> "Modified: : Di, 12_Mrz_24, Value: 600,00 "
418422
419423
```
420424

0 commit comments

Comments
 (0)