Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Gutchilimansi last won the day on April 8 2017

Gutchilimansi had the most liked content!

Gutchilimansi's Achievements

  1. Hi ezIQchad, You are receiving an error because the Substring function of Caspio doesn't allow a negative value for the length parameter. Below are two possible solutions to your issue: Solution 1 Substring( Substring([@field:ScratchPad], Charindex(': ',[@field:ScratchPad], Charindex('Departure Airport: ',[@field:ScratchPad])) , Charindex('======',[@field:ScratchPad], Charindex(': ',[@field:ScratchPad], Charindex('Departure Airport: ',[@field:ScratchPad]))) - Charindex(': ',[@field:ScratchPad], Charindex('Departure Airport: ',[@field:ScratchPad])) ) ,2,len([@field:ScratchPad]) ) This one uses the same logic as your previous code, only now it has another Substring that encapsulates your whole code. Solution 2 Substring([@field:ScratchPad], (Len('Departure Airport: ') + Charindex('Departure Airport: ', [@field:ScratchPad], 0)), (Charindex('=====', [@field:ScratchPad]) - (Len('Departure Airport: ') + Charindex('Departure Airport: ', [@field:ScratchPad], 0))) ) This second solution acts somewhat like Javascript's slice() method. Both solutions have been tested using different test data, and it looks like they are both returning the same results. Let me know if you have any questions. I hope this helps. - G
  • Create New...