Jump to content
Server Maintenance This Week. ×

How to set values referencing fieldnames


This topic is 701 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello

I managed to insert fieldnames into a word file, which MBS is able to find using the "WordFile.FieldNames" function. However if I want to set a value into one of those fields, MBS throws the following error "[MBS] Failed to find field: Test03".

I also tried combing controlfields(this is what the MBS plging is calling fieldnames)  with "text form fields". But nothing,.....    :)

Questions

  1. How do I have to setup a word file, in order to effectively use the "WordFile.SetFieldText" function correctly?
  2. Is it possible to set a "true" value for a checkbox using fieldnames? If so...  please tell me too :)

 

Thank you :)

Have a nice day

Robert

Edited by Electric_Soul
Link to comment
Share on other sites

Ok...   so I managed to set checkboxes too :=)

First of all. Do not use leagcy controls.

image.png.fcad9be7ba579c28b062cd1180710c79.png

If you need to set a checkbox, use the WordFile.SetFieldText function, to obtain the value from a already set checkbox. MBS plugin has an example fmp12 files, to help out.

image.thumb.png.82e1a8a2dae36e70e48981b4abd58627.png

 

However setting checkboxes seems flawed. If you open a word file that was manipulated with MBS and you click on a checked checkbox, you'll notice than the checkbox is not being unchecked. Only if you click twice. You could also set any characters into the checkbox field. If you'd click on those characters, then they'd be replaced with the checkbox sign. I'd say this basically means, that the checkbox is not being set at all. But it looks like it.

So... not ideal, but enough for my purposes.

Edited by Electric_Soul
Link to comment
Share on other sites

This topic is 701 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.