Skip to main content
Solved

InStr function use setting checkbox

  • 6 January 2021
  • 1 reply
  • 722 views

First time using the InStr function.  I’m simply using it within an import scenario field expression to set a checkbox field to true or false based on whether a specific character is contained within a data field in my excel spreadsheet being used as the data provider.  Seemed pretty simple, but it’s not acting at all like I’m expecting.  I’m pasting an sample of what I’m doing, I’ve been trying many different gyrations but nothing seems to be working like I would expect.  The second line is just hardcoded where it should return 0 since 2 is not in the string 1345, and then should set to checkbox to false, but it always checks the box when tested.  Maybe it doesn’t return 0 as I’m thinking?  Not sure.. Any help or suggestions would be appreciated.

 

Best answer by craig2

Have you tried doing a CBool on the entire statement, just to ensure it’s “talking” the the Import Scenario correctly?  I know they can be a little finnicky at times.

If that doesn’t work, you may want to post your entire Mapping just to see if the there’s an issue elsewhere.

View original
Did this topic help you find an answer to your question?

1 reply

craig2
Pro I
Forum|alt.badge.img+2
  • Pro I
  • 88 replies
  • Answer
  • January 7, 2021

Have you tried doing a CBool on the entire statement, just to ensure it’s “talking” the the Import Scenario correctly?  I know they can be a little finnicky at times.

If that doesn’t work, you may want to post your entire Mapping just to see if the there’s an issue elsewhere.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings