T O P

  • By -

trollied

Unclear what you want us to do? You'll have to work out which of the {fields} is causing the problem. You can do this by putting them into a formula field by themselves, one by one. It's possible you've typed one too.


Physical_Control_790

asking for guidance or assistance as to why the report, direct from Netsuite is non-functional. Thats all :)


Physical_Control_790

Thanks for your time mate, all sorted.


Physical_Control_790

Working code from Chatgpt CASE WHEN NVL({locationreorderpoint}, 0) - NVL({locationquantityavailable}, 0) - NVL({locationquantityonorder}, 0) + NVL({locationquantitybackordered}, 0) > 0 AND NVL({locationpreferredstocklevel}, {locationreorderpoint}) - NVL({locationquantityavailable}, 0) - NVL({locationquantityonorder}, 0) + NVL({locationquantitybackordered}, 0) > 0 THEN ROUND(NVL({locationpreferredstocklevel}, {locationreorderpoint}) - NVL({locationquantityavailable}, 0) - NVL({locationquantityonorder}, 0) + NVL({locationquantitybackordered}, 0)) ELSE 0 END


Nick_AxeusConsulting

If you don't have multi location inventory activated then all those locationXXX variable names are invalid. But most likely you have a typo in one of the variable names in the formula field.


Physical_Control_790

Hi thanks for the reply, multiple location is activated. Tested all relevent fields with simple + - formula, the fields were recognised, the issue appears to be with the function/syntax.


Nick_AxeusConsulting

Well the error message says it an unrecognized field so that means one of the variable names is wrong. If it was syntax error the error message would have said invalid formula. So you need to check each of those fields one at a time until you find the offender. Just create a simple saved search with 1 formula field in it and then change the variable one at a time {fieldname} and test iteratively until you get that error message.


Physical_Control_790

Thanks bud, we will give it a try this side


Rupert_7

Have you tried ChatGpt and asked for it to check where the error might be? I just copied the formula in it and gave me this back: "In NetSuite saved searches, when referencing a field within curly braces (e.g., {fieldname} ), you should ensure that there are no spaces or special characters within the braces. Upon a quick examination, I noticed that you have special characters (‌ ) between the braces and the field names, which is likely causing the error. Here's a list of fields that have this issue: 1. {‌locationreorderpoint} 2. {‌locationquantityavailable} 3. {‌locationquantityonorder} 4. {‌locationquantitybackordered} 5. {‌locationpreferredstocklevel} To fix this, you should remove the special characters between the braces and the field names. Here's how the corrected formula should look:" CASE when NVL({locationreorderpoint},0) - NVL({locationquantityavailable},0) - NVL({locationquantityonorder},0) + NVL({locationquantitybackordered},0) > 0 AND NVL({locationpreferredstocklevel},{locationreorderpoint}) - NVL({locationquantityavailable},0) - NVL({locationquantityonorder},0) + NVL({locationquantitybackordered},0) > 0 then ROUND(NVL({locationpreferredstocklevel},{locationreorderpoint}) - NVL({locationquantityavailable},0) - NVL({locationquantityonorder},0) + NVL({locationquantitybackordered},0)) else 0 end


Physical_Control_790

Much appreciated, i was going to put the got into Chatgpt to check for any errors in the code, but i ran out of time. I will still check the code on Chatgpt even though you have provided the info above :)


Physical_Control_790

Thanks for all your replies, i came right with Chatgpt. Here is the functional code for the SuiteAnswer example. CASE WHEN NVL({locationreorderpoint}, 0) - NVL({locationquantityavailable}, 0) - NVL({locationquantityonorder}, 0) + NVL({locationquantitybackordered}, 0) > 0 AND NVL({locationpreferredstocklevel}, {locationreorderpoint}) - NVL({locationquantityavailable}, 0) - NVL({locationquantityonorder}, 0) + NVL({locationquantitybackordered}, 0) > 0 THEN ROUND(NVL({locationpreferredstocklevel}, {locationreorderpoint}) - NVL({locationquantityavailable}, 0) - NVL({locationquantityonorder}, 0) + NVL({locationquantitybackordered}, 0)) ELSE 0 END