Skip 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.

SMSetVariable

Featured Replies

  • Newbies

Is it possible to pass SMSetVariable a string of text and not have it change the ¶ character?

 

Let me explain in more detail. My company currently uses the Troi Plugin to hash large strings of text. We developed a function with Scriptmaster/Groovy that will hash our strings. However, we need all of our previous hashes that were hashed using troi to be equal to a hash that we would be able to create with our current solution. For example if we were to go back and rehash a string, it must be equal to the previous string that was hashed by troi. This works fine until a string containing the ¶ character is involved. From what I understand, the SMSetVariable function converts the ¶ character to a more groovy friendly newline character.

 

The problem lies in the fact that a different hash would be produced due to different unicode characters being involved.

 

Does anybody have any creative input on this. Any help is greatly appreciated.

 

-Brian

  • Author
  • Newbies

Thank you for the response. The solution you have described does work however my company deals with patient medical data and saving text files of patient information is not a solution that my employer will allow. While I realize that I could delete the files afterward, it is still not a solution that will be acceptable. Is it possible to find the source code for the SMSetVariable and simply rewrite it so that it does not convert the ¶? I appreciate your help thus far.

How about 

text = text.replace('n' , 'rn')

 

inside the function before you do the hash??

 

How about posting a simple example from Troi to see if we can get the same solution, otherwise its just all a bit of theory??

 

Is is 'literally' the ¶ (pilcrow) character or a new line from FileMaker??

 

And why are you using the SMSetVarible methodology??

If you register the Groovy function as an external function then you can pass the text as a parameter each time you need to convert the text. Maybe that will not do the conversion??

I don't think, the implementation of SMSetVariable is available. And if it were you'd be in trouble of updating it along with the main line of the plugin.

 

Have you tried using parameters and return values (although they might be using SMSetVariable internally)?

 

 

Another possibility may be replacing all the ¶ characters with something very unlikely like a UUID, passing that replacement text to the hash function and replace back inside groovy.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.