How to change display field delimiter?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
craigbert
User
Posts: 91

How to change display field delimiter?

Post by craigbert »

Hello,

I am using all four (4) of the display fields for one of my look ups. I would prefer no comma (,) between #1 & #2 and #2 & #3. But I would like a dash between #3 and #4.
Any idea how I might go about that?

Thanks!


craigbert
User
Posts: 91

Post by craigbert »

Never mind.
Found out how to do it in the help text.

$this->MyField->DisplayValueSeparator = [",", "|", "-"]; // Array of separators (max. 3) for display field #2 to #4 in the Page_Load event.


bstefano59
User
Posts: 14

Post by bstefano59 »

When change display field delimiter then advanced search won't work.


mobhar
User
Posts: 11660

Post by mobhar »

In which server event did you put that code?


bstefano59
User
Posts: 14

Post by bstefano59 »

Page_Load event


mobhar
User
Posts: 11660

Post by mobhar »

You may try at Row_Rendering server event.


bstefano59
User
Posts: 14

Post by bstefano59 »

No, that doesn't work either. And one more note. After replacing the character(s), the second argument is lost and the third is displayed.
PHPMaker v2023 v12


mobhar
User
Posts: 11660

Post by mobhar »

If you want to implement it into the field in Extended Search and/or Advanced Search, then you may simply put this following code in Option Template under Fields setup -> Edit Tag pane:

{{:df1}}, {{:df2}} | {{:df3}} - {{:df4}}

after that, re-generate ALL the script files again.


Post Reply