#1
|
|||
|
|||
If Mergefield Not Displaying All Values
I am needing a second set of eyes. I apologize for not beiung able to copy and paste the true mailmerge field here. I cannot get GMayors Export Field Constructioins addin to work.
{ if { MERGEFIELD R2_SRL }<> "" {MERGEFIELD r2_srl \@ "h:mm"}-{MERGEFIELD r2_sru \@ "h:mm"}P " " } Should display, for example "1:30-2:00P" if there is a value for rs_srl. If not, the field is empty. What I am getting instead, when s2_srl = 1:30 PM (a true time), is "1:30" Something wrong with my field? A space missing perhaps, or in the wrong spot? Too many spaces? Both fields rs_srl and s2_sru have values in the database. Last edited by JennEx; 06-01-2019 at 08:55 AM. |
#2
|
|||
|
|||
Can I assume that because no one has pointed out my error that there is nothing wrong with my field? Is there something else that I should be looking at? The data source appears fine.
|
#3
|
||||
|
||||
Your field construction is wrong. It should be:
{ if { MERGEFIELD r2_srl }<> "" "{MERGEFIELD r2_srl \@ "h:mm"}-{MERGEFIELD r2_sru \@ "h:mm"}P"} My own preference would be: {IF{MERGEFIELD r2_srl}<> "" "{MERGEFIELD r2_srl \@ "hh:mm AM/PM"}-{MERGEFIELD r2_sru \@ "hh:mm AM/PM"}"} so the AM/PM display is correctly set by the fields themselves.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
Thanks Paul, I appreciate your willingness to share your knowledge with such patience. Thank you.
|
#5
|
|||
|
|||
Still not quite right ....
I finally had an opportunity to use this mail merge document with the change Paul recommended ...
... results in .... The data source (Excel worksheet) contains true time values for r1_srl and r1_sru. Did I put something out of place in the field code? Last edited by JennEx; 07-11-2019 at 12:29 PM. Reason: Adding image files as my inline images don't appear |
#6
|
||||
|
||||
Apart from anything else, your A/P content in the fields is not what was described. Beyond that. I'd need access to a sample data source and the mailmerge main document for diagnosis - images simply don't suffice.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help Displaying Values and Linking | GourdoftheFries | Excel | 2 | 01-03-2019 01:19 AM |
Table with values from several locations and years - need to find comp values | Ricardo Sousa | Excel | 9 | 07-27-2018 02:06 AM |
Table with values from several locations and years - need to find comp values | Ricardo Sousa | Excel | 6 | 06-09-2018 10:51 PM |
Display multiple values as new values based on selection from template. | MvdB | Excel | 2 | 09-29-2015 08:51 PM |
Printing selected pages based on a MERGEFIELD.g. If MERGEFIELD=x then print pages 1,2,4 if MERGEFIEL | Richard.p | Word | 3 | 04-21-2015 01:14 AM |