🔓

Search in Sheet

This option will return the row no of a specific data. Below it's explained how you can do it too...
To validate a given data and get the row no of that data you will need the Search in Sheet block
Understanding the working of this Block
This block is meant to check if some data (unique data) entered by the user is there in a specific column or not.
Inputs
inColumn : Name of column where you want to search for data (text input)
query : Data you wish to search for (can be text as well as integer input)
fromColumn : Name of column whose data you wish to get in return or attach a blank text if you wish to get row number in return (text input)
Right now, in this docs ill be checking if a specific email is there in the email column or not.
So as per the sample sheet I have taken for this docs, the name of the column where email addresses are stored is “ Email Address “ column
This is how your block should look.
So now we will proceed to the “ GotSeachResult ” block
The first thing we have to check is that whether the response code we have got from the server is 200 or not.
If its not 200 then that means that there was some error, you can notify the user about the error in that case by using a notifier or maybe a snackbar.
If the returned response code is 200 then we proceed
Now, let’s understand the process a bit, we can get 2 types of values now, either it will return the row no associated with the given email or else it will return 0.
So now, we will check what is the value we have got in return
If we have got a number which is not 0 then that means that it was able to find the query and has returned its row number.
If the returned value is 0 then that means the text entered by the user in the textbox is not present in the database.
I have used a notifier to display the row number, you can use any other component to save the data.
I have used an if then block to check if the value we have got is equal to 0 or not, if it is 0 then I have used to notifier to notify the user that the email address entered by the user is not in our database.
Even if you have used the formColumn block then too the blocks will look the same
This completes our process of verifying and getting the row no/corresponding column value of a specific data submitted by the user.
Documentation by Team Cloudsheets