Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

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

  • Newbies
Posted

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.

Posted

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??

Posted

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.

This topic is 4345 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.