Iryna Mykhailova · Dec 30, 2023 go to post

Congratulations to the winners! Well done! Hope you had fun doing all the daily challenges!

Iryna Mykhailova · Jan 19, 2024 go to post

Oh, wow! It's so cool to be recognized not in 1 but 2 nominations! Congratulations to everyone!

Iryna Mykhailova · Mar 19, 2024 go to post

I will definitely agree with @Chi.Nguyen-Rettig - it may be pretty helpful for some basic stuff you forgot when you're middle or senior developer and when you know exactly what you're looking for. So it's basically a bit like doing the usual search but without the need to wade through the search results.

But when you're talking about beginners - I see all kinds of things from my students (who for some reason just don't want to open the lecture and prefer to get answers themselves from other sources) that have nothing to do with the reality and don't work most of the time.

All in all, I wouldn't use ChatGPT to write code that does something complicated. But it may or may not be a good source answers for simple questions. And in this case, you still need to understand what's going on to be able to assess the correctness of what you see. Case in point, some spam posts on the Community - people try to cheat and write "articles" using ChatGPT which generates class/package names that don't even exist.

And if you think about it, where does ChatGPT get its answers? From the knowledge base somewhere. So if this data is not there, it can extrapolate and come up with something that may give you general direction but may not work.

Iryna Mykhailova · Mar 21, 2024 go to post

Can't even log in there - I get asked for a login and password in a loop 😭🤣 It doesn't seem to work for the Developer Community moderators' accounts.

Iryna Mykhailova · Mar 21, 2024 go to post

I feel like I have to pass more courses on the Learning Services to get more badges now 😁

Iryna Mykhailova · Mar 23, 2024 go to post

First of all, there are no links to docs you've tried in your post. If you add them (or the code from them) it will be easier to understand what you've already tried.

In general, I believe the easiest way to insert data in your case will be to use SQL. You can either write something like 

insertinto JASON.BikeDB (Make, Model) values (:make, :model)

and pass the values of parameters.

Or if you wish to use your class method, you will first need to add a modifier SqlProc to it:

ClassMethod SaveNew(Make As%String, Model As%String) [SqlProc]
{
    Set obj=##class(JASON.BikeDB).%New()
    Set obj.Make=Make
    Set obj.Model=Model
    Set sve=obj.%Save()
}

and then call this as a stored procedure:

begin
   JASON.DataBase.SaveNew(:make, :model);
end;
Iryna Mykhailova · Mar 23, 2024 go to post

I'm not sure there is a ReplaceStr or Strip functions in ObjectScript. But $replace should work if you need to get rid of "\T\":

USER>write$replace("AIS|1||COLO \T\ EGD^COLONOSCOPY \T\ EGD|||||||Can||", "\T\", "")
AIS|1||COLO  EGD^COLONOSCOPY  EGD|||||||Can||
Iryna Mykhailova · Jul 23, 2024 go to post

Thanks a lot for the quick feedback! Now I will know what to do if something goes awry 😉