Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

BaseElements Plugin - How to Copy Table Fields and Etc

Featured Replies

It seems like BaseElements is the tool I need to use, but I'm having some trouble getting it to work correctly. There isn't much for documentation other than a function list and if there's more examples, please share them.

 

I'm using Windows here.

 

From what I understand, with BaseElements I can have a starting solution and can automatically put fields from that starting solution into the clipboard and then manually paste them into a new solution.

 

I'm just trying to make a simple example and I'm using these functions:

 

  • BE_ClipboardFormats()
  • BE_ClipboardText ( format )
  • BE_SetClipboardText (text;format)

 

It seems like the process is to work backwards...

 

  1. I copy a single field from the Manage Database window
  2. I monitor BE_ClipboardFormats in the Watch tab and I get "Mac-XMFD" 
  3. Add another watch BE_ClipboardText("Mac-XMFD") and I get the result:
    • <fmxmlsnippet type="FMObjectList"><Field id="10" dataType="Text" fieldType="Calculated" name="T1"><Calculation table="FMTest"><![CDATA["PASTED"]]></Calculation><Comment></Comment><AutoEnter alwaysEvaluate="False"></AutoEnter><Storage storeCalculationResults="True" autoIndex="True" index="None" indexLanguage="English" global="False" maxRepetition="1"></Storage></Field></fmxmlsnippet>
  4. Convert the quotes- (") to ("):
    •  <fmxmlsnippet type="FMObjectList"><Field id="10" dataType="Text" fieldType="Calculated" name="T1"><Calculation table="FMTest"><![CDATA["PASTED"]]></Calculation><Comment></Comment><AutoEnter alwaysEvaluate="False"></AutoEnter><Storage storeCalculationResults="True" autoIndex="True" index="None" indexLanguage="English" global="False" maxRepetition="1"></Storage></Field></fmxmlsnippet>
  5. Now I create a new script to set the above text to a variable $xmlField
  6. Last, Add another step and use: BE_SetClipboardText ($xmlField;"Mac-XMFD")
  7. Move to other Solution and paste field.
  8. done?!

I suppose you could have a "XML field composing script" to create any XML for any type of field and you supply some variables? 

 

Is this the correct approach? Any other ideas? 

 

From what I understand, with BaseElements I can have a starting solution and can automatically put fields from that starting solution into the clipboard and then manually paste them into a new solution.

 

 

You don't need a plugin for that.  Just copy the fields from the one file and paste them into the other file.

  • Author

You don't need a plugin for that.  Just copy the fields from the one file and paste them into the other file.

 

My needs are a little more complex than that...Also, I want to ensure I'm copying all the fields that I need in one shot. Also, this would save the hassle of opening up manage database and sifting through the fields each time.

Not sure I follow where you think your complexity is.  Especially not about:

- being able to select multiple fields  --> you can select multiple fields at once to paste

- sifting through --> not clear what this means, especially since

None of this is normally part of an automated routine.  If it is, I would venture to say that there is some underlying architecture deficiency.

 

If you need to create fields you can use the BE plugin and use the SQL functionality to use the standard SQL capabilities to add fields.  But there again I would question the need for that in any kind of automated fashion.

 

So can you expand a bit more about the why?

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.