Jump to content

Web Services Manager - no carriage returns?


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

Recommended Posts

  • Newbies

I have scripts that process data passed in from the 360Works Web Services Manager. I found that data submitted via a web service will truncate results where it encounters a carriage return. So, of the following text...

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum ornare neque mattis porttitor. Vestibulu sodales lorem neque, ut ornare nibh. In ultricies sagittis felis, nec sodales augue consequat vitae.

In laoreet neque nulla. Sed quis lorem vestibulum neque fermentum rhoncus sed vitae magna. Nunc nec metus tellus. Sed cursus cursus nibh, eget mattis enim hendrerit vitae.

only this portion is stored in FMP field:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum ornare neque mattis porttitor. Vestibulu sodales lorem neque, ut ornare nibh. In ultricies sagittis felis, nec sodales augue consequat vitae.

is there a way to overcome this? I've tried putting the text within CDATA tags.

Thank you

Link to comment
Share on other sites

  • 1 year later...

I know this is an old post, but I thought I might as well answer it in case anyone else runs into this...

 

WSM returns new lines as line feed, not carriage return characters. You can convert the data into a new line format that FileMaker is used to working with using this calculation:

Substitute (
	$value ;
	Char ( 10 ) ;
	¶
)

I'm not sure if there could ever be a scenario that causes WSM to return data with a CRLF for new lines, but if that could/does happen, this calculation should handle it: (untested)

Substitute (
	$value ;
	[ Char ( 13 ) & Char ( 10 ) ; ¶ ] ;
	[ Char ( 10 ) ; ¶ ]
)
Link to comment
Share on other sites

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