How to force Fields using doc properties variables to update in LibreOffice Writer? - libreoffice

I need to display an adjusted version of the word count in the body of a document.
Right now it's possible to insert the total word count through Insert → Field → More Fields... (Document / Statistics / Words). The entire document will be taken into account when generating this number. This word count is a variable in its own right, WORD, which can be used in math formulas.
So to show the corrected word count I need, excluding the content from the title page etc, I created a new variable with a formula, WORD-8, where 8 is the number of words I'm ignoring. It works, but with one issue.
No matter how I insert this formula (Set Variable, Show Variable, Insert Formula), the resulting number won't update as I keep writing unless it's triggered by:
Editing the paragraph where the formula is present. Editing some other paragraph won't work.
Including the real word count (from the doc statistics tab, not as WORD) somewhere in the document. This prompts a document-wide refresh, successfully triggering the formula update.
Even saving, closing and reopening the document won't update the calculation without one of the two approachs above. Is there another automated way to keep this adjusted word count up-to-date as I write that won't visibly litter the document's body with stuff I don't need? Being forced to display the actual number is what's keeping me from just using the method 2.

Hitting F9 should force updating of fields. Note also that it may be necessary to use Ctrl+Shift+F9 to update any Input Fields in a document. See Shortcut Keys for LibreOffice Writer and Update fields (F9) not working.

Related

In sheets, duplicating responses into specific tab(s)

In forms collection, users provide me data. Most importantly in the data given is the date(s) they select (or sign up for, in my instance). I've created new tabs in the spreadsheet that are associated with the dates. I'm copying and pasting the exact information that they provide into the correct date(s) tab. Sometimes they select multiple dates. However, at this rate, I'm moving so slow and making many mistakes.
Is there a code that can duplicate what I'm doing to avoid the simple mistakes I'm making and save time?
Updated: here is the link to a mock sheet (I hope I did it right): Mock Sheet
(quick pic of what I'm working with)
https://imgur.com/a/NErREzU
Thank you for sharing your spreadsheet. Here is what I recommend:
1.) In your existing individual date sheets, select and delete whichever columns you will not be using; likewise, select and delete all rows beyond the maximum number of rows you might ever need per sheet. Keeping sheets trim is the professional standard, makes it easier to focus on the important information, and assures maximum processing speed.
2.) Delete everything from your existing individual date sheets, including the headers.
3.) Place the following formula into cell A1 of each sheet:
=FILTER({Sheet1!A:D,Sheet1!F:F},(ROW(Sheet1!A:A)=1)+(REGEXMATCH(Sheet1!E:E,"December 17, 2021")))
Adjust the date in quotation marks to match the sheet. It seems that all of your events may be happening from 5:00 - 9:00, so you don't need to include that if my assumption is correct. However, if there are different times on the same day (and will therefore be two different sheets for that day), you will need to include the start time in the formula's quotes as well, exactly as it will come in from the form (e.g., "December 17, 2021 Friday, 5:00pm"). The hyphen and end time seems it would be superfluous and can be left off.
4.) To create a new individual date sheet, simply duplicate an existing individual date sheet, rename the copy, color your header row as desired, and change the formula section between those quotes in the A1 formula (which will already be in place from the duplicate sheet.
5.) Since you will be adding further notes or other information in additional columns within each individual date sheet, be sure that you never delete information from Sheet1; otherwise, the formula-produces row information will collapse to eliminate deleted rows, and your manually entered data will not match up. For this reason, I recommend simply Hide-ing Sheet1 entirely, as this will cut down on the chance that someone may accidentally tamper with the data coming into that sheet. There is not reason to have Sheet1 showing, since all data will be included in some other sheet due to the formulas there.
The formula FILTERs in only the five target columns, which are included in the opening virtual array formed between the curly brackets { }; and it will include rows that match either one of two conditions (shown between sets of parentheses, where the plus symbol means 'OR'): either A.) the row is Row 1 (i.e., the header row information) or B.) the part in quotes can be found in Sheet1!E:E.

Multiple copies of a record based on formula

Good afternoon,
I am very new to Crystal Reports, so am not sure where to look for this information and would appreciate if someone can point me in the right direction or tell me if what I am asking for is impossible.
One of our departments uses a field called RecordChanges to note changes made to a record. The field is text and the department stores information there about the date a change is made and the type of change, separated by commas (i know this is terribly inefficient, but it's what I have to work with). I have a Crystal Report that parses this text field and picks up the latest date and latest change made to the record. I would like to modify this report to include ALL the changes made to the record, so if the field RecordChanges of the data source has 3 dates, I would like this record to appear in my Crystal Report 3 times, once for each change that was made. How to parse the field I can figure out but where I'm stuck is how do I make the number of times a record appears equal to the number of dates found which is my {#DateFound} field?
There is a lack of details, but as far as I understood the problem and assuming that you did state in the comment that "there wouldn't ever be more than 5 changes to an order", here is a first try to tackle the situation.
I will assume that you already have a formula that "parses this text field and picks up the latest date and latest change made to the record". And that you know how to adjust this formula to pick up each of the record changes. I will name this formula as {#Parser1}.
Based on {#Parser1}, create other 4 formulas: {#Parser2}, {#Parser3}, {#Parser4}, {#Parser5}. As you probably presume, each formula must be changed to parser the Nth occurrence of the record change.
Create 5 details sections.
Put each formula in each detail section.
Suppress the detail section wich formula is null or empty.
That's it.
The limitation is that you can have at most 5 record changes.
This is an awkward solution, but it is necessary (as far as I know) since Crystal Reports works based on your data rows. It iterates over the rows, but cannot "generate" more rows by itself. If you can manipulate the data source, you can create other solutions.
You still need to do the magic trick to pickup the Nth change from the text.

Adding the totals of two seperate tables in a word document

this question relates to adding the totals of two tables and using that total in the body of the word document.
In my case I have a word document (docx) with two tables. These tables are populated through a word merge process of third party software over which I have no control. For ease of reference I will refer to each table as table1 and table2. Both tables will contain an unknown amount of rows, but the last row, will always contain a total in the last column, which will total the rows above using the formula =SUM(ABOVE).
In the body of the document, I know need to reference the total of each table and because I do not know how many rows there are, I am at a loss. For example, if I knew how many rows there are, I could use the answer given here.
I have tried to using a merge field - with the column names as follows - however I get a !Syntax error ...
=SUM(table1[Amount]+table2[InterestAmount])
Any and all help greatly appreciated.
If you bookmark the two tables (e.g. TblA, TblB), you can use a formula field to tally their totals:
{=SUM(TblA C:C)/2+SUM(TblB C:C)/2}
The reason for the /2 is that, unless you know the last row # beforehand, you need to reference the entire column (including your existing totals row), the sum of which will therefore be twice the total.
To see how to do a wide range of calculations in Word, check out my Microsoft Word Field Maths Tutorial, at:
http://www.msofficeforums.com/word/38720-microsoft-word-field-maths-tutorial.html
or:
http://www.gmayor.com/downloads.htm#Third_party
Fields can be bookmarked in Word, then referenced elsewhere in the document. When bookmarking in a table, be careful to not select the entire cell, only the field! If the entire cell is bookmarked then the cell structures are carried across to the REF and the field content can't be processed numerically.
For three bookmarked fields with the names Fld1, Fld2and Fld3 that should be multiplied the combined field code would look like this:
{ = { REF Fld1 } * { REF Fld2 } * { REF Fld3 } \# "0.00" }
Note that you could also use the PRODUCT function (like SUM, but multiplies, each factor separated using the system's list separator character.)
Notes for readers not familiar with working with Word field codes: the paired wavy braces must be inserted using Ctrl+F9 and cannot simply be typed from the keyboard. Alt+F9 will toggle between field code and field result display. Press F9 to force a field to update.

Link Field code in MS Word and automatic numbering

I have a document in Microsoft Word (2013 on Windows 8.1) with a numbered list (simple list numbering) from 1. to ~300. Within this same document, I used cross-references to refer to specific list elements by number.
In a separate Word document, I use the {Link} field code to refer to my list element using bookmarks.
However, when using the {Link} field Code, all numbering shows as "1.", and not the actual given number for the list element.
Is there a way to fix this occurence, short of converting all the automatic numbering to text?
Thanks for your insight,

Prevent a text field within a portal from being truncated, filtering portal contents to display in another layout

I am already using Filemaker Pro 10, I have two questions:
I have a text field in a portal, and whenever I am entering values like "B12C45" in it, it works well, but when the string is longer like "BC12F42, B45z87" it doesn't show whole the strings and omits the letters from it. what Can I do?
My second question is that: I have a portal in a layout, in this portal every row has an id sometimes the id is repeated in other rows but the value of another field called Position is changing. Now I want to have those rows of this portal which have the same id in another layout. I have tried using scripts for it, but scripts don't work well in this case, and they are entering whole the portal in the new layout not the parts I want . How can I write a script which does this?
I will really appreciate any help.
For the first question there are many ways you could display more data in a field and the best one will depend on the particular implementation in your database. There are three main ways to solve this problem: field-size adjustments, text-size adjustments and programming adjustments to dynamically change the text-size.
Field-size adjustments include:
Making the field longer
Using the autosizing aspect of a field so that as the window grows, so does the field
Text-size adjustments include:
Making the font size for that field smaller.
Setting the font style for that field to condensed.
Programatically, though, three things stand out to me as possibilities. I like the third one the best for most of my solutions:
Set the tooltip for the field to "Self" (without the quotes). A user can see the entire contents of the field by hovering the mouse over the field.
In "Define Database" set the field's calculated value to: "TextStyleAdd(self;Condense)" (without the quotes) and make certain that "Do not replace existing value of field" is turned off
Use Conditional formatting to add the Condense style or use a smaller font when the number of the characters in the field gets long.
The steps for using conditional formatting are as follows:
In layout mode select the field and select 'Conditional Formatting...' from the pop-up menu
Add a new condition
Change the condition to 'Formula is'
In the text field enter "Length(Self) > 8" (without the quotes)
Press the "More Formatting..." button
Select "Condense" as the Style from the text
You can add multiple conditions, so you might have "Condense" only for Length(Self) > 8 and another condition for Length(Self) > 16 where you set both "Condense" and reduce the Font Size.
As for your second question, I'm not able to get a picture of what you're trying to do from the question you asked. You might be able do the following in a script:
Go to Related Record [the portal relationship]
Sort Records [by ID]
And then use a summary field (Count of ID) to determine how many of each ID you have.
If you clarified what you were trying to do, gave more information about your tables and table occurrences, we might be able to provide a better answer for this instance.

Categories