Api returns an empty value

i am trying to learn api.

so i created a text box.

image

in which when i enter text it searches though it using api then if the api is empty it shows a error message and if the api returns data it shows the title.

i know how to show the title. but cannot create a message when data return is empty

You only show a part of what you are doing, making it difficult to offer support:

  1. Show the url you are calling (in text)
  2. Show the content of global ApiInput (in text)
  3. Show the Web1.GotText event and blocks

in this url (khtfkytfktf) below is any Gibberish text which is invalid. Apiinput is text

http://api.pushshift.io/reddit/submission/search/?subreddit=khtfkytfktf&limit=5

image image

This test

at the beginning of your web1.GotText, before trying to iterate the list, will identify if the list is empty or not

it returns that length of list cannot be in argument

You will need to capture your responseContent first to the variable...

how to switch screens correctly see here https://puravidaapps.com/manager.php


Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.