Solved

InStr function use setting checkbox

  • 6 January 2021
  • 1 reply
  • 602 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.

 

icon

Best answer by craig2 7 January 2021, 18:52

View original

1 reply

Userlevel 4
Badge +1

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.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved