Hi TB Community!
I am wondering how I can eliminate characters/only pick up the first character using a "read from website" chip?
Here is the website I am reading from:
Here is how it is showing up in my snippet:
What would be right way to tell this chip to only use the first character? Or to eliminate the ending few characters? Whichever is easier
Best,
Andrew
Also - In a similar vein to my initial question -
I am using a "read from a website" as my default for this part of my snippet
Here is what Textblaze is pulling in:
How would I tell Textblaze to get rid of the first $ character when "reading from the website"?
Thank you!
Andrew
Hi @ajduna7,
In these scenarios, you can utilize our list functions and text functions to set the default value for those text fields. For instance, in the first case, you can use split(baths, " ")[1]
, which will split the input on spaces into a list containing ["3", "(2/1)"]
and select the first element, which is 3
.
In the second case, you can use replace(rent, "$", "")
to eliminate the "$" from the rent, effectively removing it from the final string.
Thank you for the Reply Ashwin!
I am "pulling in" the price from this website:
Here is how I structured the chip (to attempt to get rid of the $):
When testing the snippet - its gives me this error:
[Error - "default" cannot depend on form data here]
What does this mean and how might I go about addressing it?
Thank you Again
Hi @ajduna7,
Actually, there is a small issue with the syntax. It should be replace(catch({site}, “”), “$”, “”)
. Let me know if you have any further questions.
1 Like
Thank you Ashwin! That worked perfectly