Jump to content
Server Maintenance This Week. ×

Base64 Encode/Decode problems


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

Recommended Posts

I recently tried to implement a Base64 Encode/Decode approach to create a vCard from FMPro as previously described in this post https://radicalappdev.com/blog_02/. The file resides on an iMac at my front office desk running FMPAdv13. When opening the file and running the Base64 script to export the vCard on this Mac, I get an empty card however if I run the file from from FMPAdv15 from my laptop on the same network (hosted on the FMPAdv13 Mac) the vCard is exported as expected.

I looked at the encode function and found that in the FM13 file the field has a single "?" however in the FM15 view it is filled with data (screenshots attached).

Can anyone shed light on how to implement this correctly from the FM13 client? I have changed the vCard format to suit my needs but nevertheless the 2 different versions do perform differently. Using FM14 behaves as expected (i.e. the same as FM15).

Thanks, Murray

 

 

 

Screen_Shot_2016-06-29_at_12_39_59_PM.png

Screen_Shot_2016-06-29_at_12_55_26_PM.png

Link to comment
Share on other sites

3 hours ago, muzz said:

as previously described in this post https://radicalappdev.com/blog_02/.

Perhaps you should have read that post to the end - where it says that support for encoding text in Base64 format was only added in version 14.

I must say I am puzzled what advantage this technique brings. For one thing, you can export the contents of a text field directly, without jumping through this encode/decode hoop. Even better, you can custom-build any text file directly from the original fields by exporting via XML/XSLT - without littering your solution with calculation fields that serve no internal purpose.

Link to comment
Share on other sites

 Thanks for your reply comment.

The last time I looked at that post other than to quote it today was before those last posts were there at which time I had read it to the end - the end is just in a different place now.

However the example file provided works perfectly with FM13 despite the assertion that support for encoding text in Base64 format was only added in version 14.

The advantage that this technique brings to me is that someone (Joe Simpson) kindly provided an example as to how to do it with tools that I already have. I'm not a developer and have no understanding of XML/XSLT but am just trying to get something to work that helps me get on with my core business.

Link to comment
Share on other sites

25 minutes ago, Kris M said:

Filemaker documentation shows that Base64 Encode/Decode originated in Fm 13

https://www.filemaker.com/help/15/fmp/en/index.html#page/FMP_Help/base64decode.html

 

Hi Kris,

I had read Base64 Encode/Decode originated in FM13 (I created the calcs in FM13 and the functions were available there) however I think the documentation refers to "specified container fields" in FM13 and "specified fields" in FM14, a nuance I had missed.

Edited by muzz
Link to comment
Share on other sites

2 hours ago, muzz said:

The advantage that this technique brings to me is that someone (Joe Simpson) kindly provided an example as to how to do it with tools that I already have.

Well, apparently you don't have those tools in version 13.

OTOH, XML/XSLT is supported since version 6.

Link to comment
Share on other sites

Perhaps I should have said that the example allowed me to adapt it to my use without having to learn other languages or research techniques beyond standard Filemaker functions which I have been able to fumble through with occasional help, usually non-judgemental and always gratefully received.

The presence or absence of the above mentioned "tools" in version 13 is debatable as the example file intended for use in FM14 works perfectly in FM13, suggesting that at least in this particular case version 13 does support encoding text in Base64 format. It does not however work in my implementation which is what I would like to resolve if I can. 

Link to comment
Share on other sites

In Joe's own words: "I did something similar in FileMaker 13 but got inconsistent results, just like you did. If you need to get this working in FileMaker 13 you could try the BaseElements plugin. https://baseelementsplugin.zendesk.com/hc/en-us/articles/205350447-BE-Base64-Encode"

Are you using the BE plugin to accomplish this? I vaguely remember trying this a long time ago with 13. But it only worked under very rare circumstances...if at all. I really don't remember getting it to ever work with 13 without a plugin.

Link to comment
Share on other sites

Thanks Josh. I will just work around by generating the vCards on my laptop and transferring them to my main computer from there. I had already upgraded to FM15 but had to downgrade again due to FM15 generating corrupt PDFs, a problem not yet sorted but I'm assuming that an update will fix that and I can start using 15 on my main computer again.

Thanks for your help and I will bear it in mind.

Link to comment
Share on other sites

Thanks Josh - I already had their number up on my screen. That would be a good solution for the time being. 

Link to comment
Share on other sites

On 30 June 2016 at 9:49 AM, Josh Ormond said:

What did you downgrade to? Call FMI and get the download link for 14. :)

Filemaker have downloaded me to FMAdv14 without a problem and the solution is working fine.

Thanks for everyone's input.

Link to comment
Share on other sites

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