Bug 149675

Summary: FILEOPEN DOCX Mail merge fields as IF field parameters missing
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: dgp-mail, ilmari.lauhakangas
Priority: medium Keywords: filter:docx
Version: 7.5.0.0 alpha0+   
Hardware: All   
OS: All   
URL: https://help.libreoffice.org/7.3/en-US/text/swriter/01/04090200.html
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on: 149660    
Bug Blocks: 112969    
Attachments: Example file from Word 2016 with Mail Merge fields as IF field conditions
Example data source

Description Gabor Kelemen (allotropia) 2022-06-22 13:24:59 UTC
Created attachment 180902 [details]
Example file from Word 2016 with Mail Merge fields as IF field conditions

This is a followup to bug 149660 

In Word it is possible to use Mail Merge fields as conditions of the IF field, by the Mailings ribbon - Rules - If ... Then ... Else dropdown menu.
This causes the IF field to be evaluated based on values in the data source.

Using data source fields as conditions in IF fields is supported in Writer, but the docx import of these fields is likely missing.

1, Open attached document, and import the data source xlsx file too
2, The Mail merge toolbar should be able to step through the data source data points, and the value of the IF fields should change accordingly.

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3b852f274696a5e2a44bb4107c37cea9d291758e
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded
Comment 1 Gabor Kelemen (allotropia) 2022-06-22 13:26:03 UTC
Created attachment 180903 [details]
Example data source
Comment 2 Dieter 2023-01-09 07:39:34 UTC
Gabor, since there seems to be nobody who could (or tried9 to confirm the bug, I would try to do it, but steps are too raw for me. I've opened test fle, but don't know how to import data source.
Comment 3 Buovjaga 2023-03-16 12:08:19 UTC
File - New - Database - Connect to an existing database - Spreadsheet. It will be registered by default.

View - Toolbars - Mail merge

If I click the Next Mail Merge Entry in the toolbar, four paragraphs get cleared. I guess this confirms the issue.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0d8d0fb8932652f182c46805d5cf3ae7f6ebadd5
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 16 March 2023