Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Stuck in Dexterity

Posted on by 32

I've been stuck for a couple of hours.   I've got a pretty basic dexterity script that creates a temp table and then runs a report with that data.  The script:

if not required (form TAS_SOP_Packing_Labels) then
    warning "Not all required fields have been entered.";
end if;

range clear table SOP_LINE_WORK;
set 'SOP Number' of table SOP_LINE_WORK to 'SOP Number';
set 'SOP Type' of table SOP_LINE_WORK to 'SOP Type';
clear field 'Component Sequence' of table SOP_LINE_WORK;
clear field 'Line Item Sequence' of table SOP_LINE_WORK;
range start table SOP_LINE_WORK;
set 'SOP Number' of table SOP_LINE_WORK to 'SOP Number';
set 'SOP Type' of table SOP_LINE_WORK to 'SOP Type';
fill field 'Component Sequence' of table SOP_LINE_WORK;
fill field 'Line Item Sequence' of table SOP_LINE_WORK;
range end table SOP_LINE_WORK;

get first table SOP_LINE_WORK;
while err() <> EOF do
    set 'Item Number' of table TAS_Packing_Labels_TEMP to 'Item Number' of table SOP_LINE_WORK;
    set 'Item Description' of table TAS_Packing_Labels_TEMP to 'Item Description' of table SOP_LINE_WORK;
    set 'QTY To Invoice' of table TAS_Packing_Labels_TEMP to 'QTY To Invoice' of table SOP_LINE_WORK;
    set 'U Of M' of table TAS_Packing_Labels_TEMP to 'U Of M' of table SOP_LINE_WORK;
    set 'Purchasing Status' of table TAS_Packing_Labels_TEMP to 'Purchasing Status' of table SOP_LINE_WORK;
    set 'Item Number' of table IV_Item_MSTR to 'Item Number' of table SOP_LINE_WORK;
    get table IV_Item_MSTR;
    set 'Short Name' of table TAS_Packing_Labels_TEMP to 'Item Short Name' of table IV_Item_MSTR;
    save table TAS_Packing_Labels_TEMP;
get next table SOP_LINE_WORK;
end while;

if '(L) Include Logo' = true then
    run report TAS_SOP_Packing_Labels_Logo with restriction ('SOP Type'
[33]  of table TAS_Packing_Labels_TEMP = 'SOP Type' and 'SOP Number'
[34]  of table TAS_Packing_Labels_TEMP = 'SOP Number') {destination 0, 1};
else
    run report TAS_SOP_Packing_Labels with restriction ('SOP Type'
[37]  of table TAS_Packing_Labels_TEMP = 'SOP Type' and 'SOP Number'
[38]  of table TAS_Packing_Labels_TEMP = 'SOP Number') {destination 0, 1};
end if;

When I compile, I get the below - the line numbers are in brackets.

2022_2D00_08_2D00_10_5F00_17_2D00_01_2D00_05.gif

Running the debugger in test mode, I have the below locals immediately prior to the report printing paragraph.

2022_2D00_08_2D00_10_5F00_17_2D00_03_2D00_19.gif

Can anyone see what I cannot?

Categories:
  • CindyFromIndy Profile Picture
    CindyFromIndy 32 on at
    RE: Stuck in Dexterity

    I did!  Both with the window fields and those in SOP_LINE_WORK.

    Turned out that I was referencing fields in the table that were not there.  I knew it had to be something silly!  

    Thanks for responding so quickly David!

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,928 Most Valuable Professional on at
    RE: Stuck in Dexterity

    Hi Cindy

    I looks like it is complaining about the window fields not the table fields.

    Have you tried fully qualifying them with the of window of form syntax?

    Regards

    David

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans