Skip to main content

Hello,

I’m struggling to get macros working in our customer’s 23R2 environment for a session I have with them very soon.  I copied the macro and blocks from our GCS Demo Database, which is 24R1.  I used the ones whose names begin with IFS_ and where the write used ALL CAPS.

When I first ran my test using CHECKOUT, nothing happened.  I’ve since gone back and am adding msgboxs to glean what information I can about what subroutine is being run at a particular moment

In the IFS_01_02_GENERAL_GET_DATA block, we have the code and I’ve added the msgbox.

ifs_check_out_path = clientscriptvalues.item("check_out_path").value
If ifs_check_out_path = "" then
' use the check_out_path client script value instead
ifs_check_out_path = scriptvalues.item("local_path").value
end If 
MsgBox "We've just fetched the checkout path e"&ifs_check_out_path&"] is it blank?" 

 

When I run, the message box reads:
 

MsgBox from macro testing

This is telling me that it has not found the checkout path in either the clientscriptvalues or the scriptvalues.

Might anyone be able to give me a clue as to what may be happening?

Thank you.

@Mathias Dahl : I found the presentation you did on Tech Talk to be very good.  It’s here is anyone want to see it.

https://l.workplace.com/l.php?u=https%3A%2F%2Fifs-my.sharepoint.com%2F%3Av%3A%2Fg%2Fpersonal%2Fmathias_dahl_ifs_com%2FEauq4Mf9cytPnNg3sZABqPMBNVt-yUSmSouMTzhzchLKBA%3Fe%3D43iWZS&h=AT2LjbEbbBFSwzvakWR2TJOM3xqbTTzUiKY3AezdKxdKFghbZXz8MAXGZnLnrrQ8Lhwptd4FxkbxlZD

I may have found my own answer.  When I copied the macro blocks, I cleaned them up by removed all the capitailzation.  It appears that the variables like CHECK_OUT_PATH and LOCAL_PATH must be in all caps.


Have a look at this simple macro as well:

 


My frustration level is very high but I think I have it working in the GCS Demo Database.  I’ll move to the customer’s database shortly.  I spent all day working with the macros that are in the DEMO Database.  I renamed them and created my own Document Macro for CHECKOUT and added a whole bunch of message boxes so I could see where things were going.  I thought it might be in the Get_Data() function so I drastically reduced the number of attributes it was fetching and when I built my macro, I gradually added blocks and kept my eye on the msgboxes.  Things were working and I returned to the full suite of attributes without a hitch.  So, after all that, as far as I can tell, I’m back to where I was 8 hours ago!  I don’t think I changed any of the code but if I did, it was a lucky accident.  A couple of questions for you:

  1. When the blocks area assembled into a macro, what makes the system go from one to the other?  I see that Open_Word calls Get_Data that calls the A2A functions, then Open_Word calls File_Exist, Make_Read, and App_Check.  How do the Word_Edit and Object_Connection functions get called?  Do they just run by themselves becuase they are in the block of macros?
  2. I’ve copied the blocks from the GCS Demo to the customer’s database and I retested in the GCS Demo database.  It’s working but strangely enough, the msgboxes that are in the blocks are not popping up on my screen.  The macro is running becuase I can see that it is updating  my document but not messages.  Is there something that could make the script NOT display msgboxes?

You’ve been a great help and I really appreciate you taking the time to help me and the customer.  For me, I think it’s just another signal that retiring is the right thing to do!

 

/Patrick


Reply