web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

TyptTo in Macro, Data being truncated

(0) ShareShare
ReportReport
Posted on by 65

Hope someone can help. I've got a Macro I need to populate a po in GP. Everything works perfect except the text I try and type into the comment section get''s cut off at some random spot. Are there any specific rules to using the "TypeTo" command?

Here's a example....

NewActiveWin dictionary 'default'  form 'POP_Comment_Entry' window 'POP_Comment_Entry' 
  MoveTo field 'Comment Text'
  TypeTo field 'Comment Text' , 'SHELL: 72" OD X 4~" X 1/2", SA-516-70N-SINGLE OUTSIDE 30 DEGREE BEVEL;-NO LAND (CIRC SEAMS); SINGLE OUTSIDE 30 DEGREE BEVEL -NO LAND, 1/8" GAP (LONG SEAM)'
  MoveTo field 'OK Button K'
  ClickHit field 'OK Button K'

So I would expect to see this in the comment window

SHELL: 72" OD X 4~" X 1/2", SA-516-70N-SINGLE OUTSIDE 30 DEGREE BEVEL;-NO LAND (CIRC SEAMS); SINGLE OUTSIDE 30 DEGREE BEVEL -NO LAND, 1/8" GAP (LONG SEAM)

but get this

SHELL: 72" OD X 4~" X 1/2", SA-516-70N-SINGLE OUTSIDE 30 DEGREE BEVEL;-NO LAND (CIRC SEAMS); SINGLE

*This post is locked for comments

I have the same question (0)
  • L Vail Profile Picture
    65,271 on at

    Hi Dave,

    It's odd that it allowed 99 characters. When I tried running the macro with various lenghts of messages , including yours, it would cut off at 80 characters. That made sense to me only because Report Writer can only handle an 80 character string.

    I did it 12 times, and every time it was 80 characters (once it was 79). I used different text each time. I know it doesn't solve your problem, but I'm not surprised it is a problem. I tried some other Comment text fields and got the same result, 80 characters.

    This isn't the behaviour I was anticipating, but it's consistent. If you measure some of your other comments, do they cut off at 80 characters?

    Kind regards,

    Leslie

  • Dave May Profile Picture
    65 on at

    Hi Leslie, thanks for the reply.

    It's odd because I thought that at first too but I was sure I wasn't getting the same number of characters every time, it depended on the string I was passing. I'll have to go back and check. I know for sure that you can copy paste that same string no problem and it saves. At first I got tripped up by the ' being in my string, hence the ~". I also made sure to strip out any returns, tabs etc..

    Hmmmmmm

  • L Vail Profile Picture
    65,271 on at

    Dave,

    You're right about the copy and paste. It works every time in the non-macro real life world. I tried to use the paste command with the macro. The first couple of times it was no problem. Then I started getting an error saying the command had been disabled. When I lowered the character count, the error went away. I slowly increased the character count and then it was doing the paste with no problem.

    I couldn't get it to consistently error out on me, so I couldn't pinpoint the problem. The problem is definitely there. I also tried using a saved (blank) comment ID. That didn't seem to matter either.

    Have you been doing this before and it just stopped working? What build are you running? I'm on 11.00.2044, which I think is the most current.

    Kind regards,

    Leslie

  • Dave May Profile Picture
    65 on at

    Leslie,

    I'm on version 11.00.1860. We just went "live" with GP so all of this is new.

    I've made a little progress. I tracked the comments to a table [POP10550] it looks like it splits the comment into 4 char(51) fields as well as keeping a copy in a text field (which is an old format). I tried spliting the same comment into lines and it works. I'm sure that if I tried enough different strings I would get some truncating but this should work for now.

    NewActiveWin dictionary 'default'  form 'POP_Comment_Entry' window 'POP_Comment_Entry' 
    MoveTo field 'Comment Text'
    TypeTo field 'Comment Text' , 'HEAD:(2) 72" OD X 2:1 S:E X 2" SF X 5/8" NOM (0.53125" MIN);'
    TNT_Event , '090039025100000000000200001ED9AA60ED' # cntrl chr
    TypeTo field 'Comment Text' , 'SA-516-70N; SINGLE OUTSIDE 30 DEGREE BEVEL; NO LAND'
    TNT_Event , '090039025100000000000200001ED9AA60ED' # cntrl chr
    TypeTo field 'Comment Text' , '(CIRC SEAM); HOT FORMED'
    MoveTo field 'OK Button K'
    ClickHit field 'OK Button K'

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans