Substring is being ignored?

It appears that my substring request is being ignored?

my query:

the actual call being sent

The substring function you used should ideally work. If it is not functioning as expected, I suggest testing it with a smaller range, from 0 to 5, to determine if the string function is working correctly.

If it doesn’t solve your issue, I’d like you to please provide a screenshot of the output so that we can quickly investigate the issue and assist you further.

1 Like

The screenshots are above. I am asking for a substring of 2400 characters, put its outputting well over 4000 characters.

Look here it is again please try to understand it this time. You could have tested this yourself or even looked at the images above.

HERE’S THE PROMPT:

HERE’S WHATS HAPPENING:

Here’s a video of me using my credits to find your problem.
It fails after 200. Consistently.

Please fix this or give me a workaround. Users should not have to troubleshoot for the company at their own expense, don’t you agree?

Hi @Ryan_Scott,

Can you paste the input string here? I tested this works fine for me, so was wondering maybe there is something amiss with the input string. Can you just copy paste it here, also, Can you check if you can use substring in a Set Variable Module and see if it gets truncated as desired?

1 Like

It is doing it to multiple strings I’m getting through a newsapi. It fails on all of them consistently. They are big strings, I don’t see copying and pasting them here as practical.

There are just text and it should not matter. Here’s 6 examples of it running with and without splitting it at 200 characters. It fails over 200 characters. If you watch this it will be abundantly clear I’m not doing anything unexpected. You might have to wait for the HD resolution to come in on this video.

I believe that you are getting those from RSS right? Can you share the RSS feed?

No, newsapi.

Every time I do it, its slightly different in terms of the data I get from newsapi, so its worked on all kinds of data. It works 100% of the time if I tell it to truncate at 200, 0% of the time at 250.

The point is you can clearly see that if I tell it to truncate at 200 vs 250, I get dramatically different answers. The source material should not matter for a simple truncation.

The problem is not with the source material. That would be absurd because no matter what text substring gets it should be able to handle it.

If you want access to my account I’m happy to give it. Send me a pm i’ll give you a temporary password?

Nah, This is on Newsapi end, Weird but they seems to send content as ,

Greece’s conservative New Democracy has won Sunday’s elections, falling a handful of seats short of outright victory.\r\nPrime Minister Kyriakos Mitsotakis’s party polled almost 41%, based on more than… [+2557 chars]

See the JSON response that I am getting and from the document it seems that,

contentstring

The unformatted content of the article, where available. This is truncated to 200 chars.

{
	"status": "ok",
	"totalResults": 38,
	"articles": [{
		"source": {
			"id": null,
			"name": "BBC News"
		},
		"author": "https://www.facebook.com/bbcnews",
		"title": "Greece election: Centre-right wins but set to miss out on majority - BBC",
		"description": "Centre-right Kyriakos Mitsotakis heads for a big election win, a few seats short of outright victory.",
		"url": "https://www.bbc.com/news/world-europe-65666261",
		"urlToImage": "https://ichef.bbci.co.uk/news/1024/branded_news/6067/production/_129797642_f67f5e5043167e48e9b95f61f90f0e48dfe854fb0_31_6000_33751000x563.jpg",
		"publishedAt": "2023-05-21T18:32:43Z",
		"content": "Greece's conservative New Democracy has won Sunday's elections, falling a handful of seats short of outright victory.\r\nPrime Minister Kyriakos Mitsotakis's party polled almost 41%, based on more than… [+2557 chars]"
	}, {
		"source": {
			"id": null,
			"name": "The Guardian"
		},
		"author": "David Hytner",
		"title": "Manchester City cap title triumph with win over Chelsea thanks to Álvarez - The Guardian",
		"description": "Julián Álvarez scored the game’s only goal after 12 minutes as Manchester City celebrated winning the Premier League by beating Chelsea 1-0",
		"url": "https://www.theguardian.com/football/2023/may/21/manchester-city-chelsea-premier-league-match-report",
		"urlToImage": "https://i.guim.co.uk/img/media/cd9ba621b5f3d47920fd524a6fb1b83f039ecd22/197_172_5432_3259/master/5432.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctZGVmYXVsdC5wbmc&enable=upscale&s=518f37bfa89d9c73f9a9e261674ad1d6",
		"publishedAt": "2023-05-21T17:17:00Z",
		"content": "Manchester City have never enjoyed a more dominant moment or a more tantalising one. A third Premier League title in a row and fifth in six seasons? Check. It had been sealed when Arsenal lost at Not… [+11400 chars]"
	}
1 Like

what the heck

i thought that +x chars was make.
(obviously)

Yeah, I thought the same at first :sweat_smile: :sweat_smile: