Page 1 of 1
How to change display field delimiter?
Posted: Sat Mar 18, 2023 2:18 am
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!
Re: How to change display field delimiter?
Posted: Sat Mar 18, 2023 2:40 am
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.
Re: How to change display field delimiter?
Posted: Fri Apr 28, 2023 8:44 pm
by bstefano59
When change display field delimiter then advanced search won't work.
Re: How to change display field delimiter?
Posted: Fri Apr 28, 2023 10:20 pm
by mobhar
In which server event did you put that code?
Re: How to change display field delimiter?
Posted: Sat Apr 29, 2023 3:40 am
by bstefano59
Re: How to change display field delimiter?
Posted: Sat Apr 29, 2023 8:58 am
by mobhar
You may try at Row_Rendering server event.
Re: How to change display field delimiter?
Posted: Sat Apr 29, 2023 5:10 pm
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
Re: How to change display field delimiter?
Posted: Sun Apr 30, 2023 1:20 pm
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.