Share via

Field > Toggle codes > SET / REF giving error

Anonymous
2024-04-09T07:04:35+00:00

Hi,
I'm looking for a solution to use the same information on Word cover page in next section headers.

Title and Subtile tile fields works prefectly. User can write those on Cover and then the same information is on later headers automatically. But when I try to add to two dates to work in similar way, I'm getting Error. ("Reference Source not found")
(The cover needs to have one date about when the review has been done and another when the report has been written. Neither of these dates are the current date or the document creation date)

Here are the toggle field codes I'm using.

In date Set Field { DATE @ "d/M/yyyy" \*MERGEFORMAT } { SET RapPVM }

In date Ref Field { REF RapPVM @ "d/M/yyyy" \*MERGEFORMAT }

Is it because its not possible to have two different dates? How then go around this?

I'm using mac if that makes any difference.

Thank you!

Microsoft 365 and Office | Word | For business | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Stefan Blom 342.6K Reputation points MVP Volunteer Moderator
2024-04-09T08:54:46+00:00

If the client is supposed to type the date, you need a different implementation of this. ASK or FILLIN fields can be used or you can create a more advanced form. See https://gregmaxey.com/word_tip_pages/repeating_data.html.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Stefan Blom 342.6K Reputation points MVP Volunteer Moderator
    2024-04-09T08:08:25+00:00

    The nested field will create the variable, RapPVM. It won't display a result in the document; that is correct. It is supposed to work that way.

    To display the date in the document, you must use the REF field. You can use the REF field repeatedly in a document. Any changes made to the original nested field will then be reflected as you update the REF fields.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-04-09T07:56:13+00:00

    Thank you so much for the fast response.

    But when nesting the code that way, it will empty the whole field when changing back from the toggle code and I have no way to add the wanted date in to the field.

    Was this answer helpful?

    0 comments No comments
  3. Stefan Blom 342.6K Reputation points MVP Volunteer Moderator
    2024-04-09T07:41:47+00:00

    To store the date in the RapPVM variable/bookmark you have to nest the fields:

    { SET RapPVM { DATE @ "d/M/yyyy" \*MERGEFORMAT } }

    You can then display the content of RapPVM with:

    { REF RapPVM }

    To create each pair of field delimiters, press Ctrl+F9 (or Ctrl+Fn+F9 on some keyboards).

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-04-09T07:32:56+00:00

    Or is the case that I should use Content controls (like the title and subtitle are) and not the Field function? Adn because on Mac there is no access to the content controls so the case is impossible?

    Was this answer helpful?

    0 comments No comments