検索

質問
· 21 hr 前

Run EnsLib.FTP.InboundAdapter on demand

Hello community.

I have a request from a client who wants to do the following.
Currently, they have a data upload process via FTP in which they have implemented a RecordMap to store the information of the CSV files that are uploaded to the FTP directory.
Now they want to have another directory so that it is ONLY executed through an external instruction, not when the file is uploaded to the directory.

Is it possible to create a process that reads the FTP directory on demand? That is, ONLY executes the EnsLib.FTP.InboundAdapter service when we tell it to.
There would be no problem creating an API service that is responsible for receiving the execution request and invoking the Business Service to start it.

2件の新着コメント
ディスカッション (2)3
続けるにはログインするか新規登録を行ってください
質問
· 2025年9月4日

Impact of SQL-Mapped Class Indexes on Legacy Programs with Direct Global Access

Hello,

I am currently maintaining a legacy application that was developed in ObjectScript and accesses data by working directly with globals.
For a new program, however, I plan to access the same global data through SQL-mapped classes.

I have two questions regarding this approach:

  1. If I define indexes in the SQL-mapped class, what potential impact (if any) could this have on the existing legacy application that directly accesses the globals?
  2. I’ve read that when an index is defined in an SQL class, it will not be automatically updated if data is modified directly in the global (outside of SQL operations). Is this correct?
    • If so, what are the common or recommended solutions to ensure index consistency in such cases?

Thank you for your guidance.

1件の新着コメント
ディスカッション (1)3
続けるにはログインするか新規登録を行ってください
質問
· 2025年9月4日

Regex search for Z09 or any string of A-Z followed by 0-9 0-9

..Contains(source.{ORCgrp(x1).OBRuniongrp.NTEi2(x2):Comment(x3)},"(")&&..Matches(source.{ORCgrp(x1).OBRuniongrp.NTEi2(x2):Comment(x3)},"^[A-Z][0-9][0-9]$")

I want to do this to match strings such as X98. Community AI tells me this is correct but I get an error in testing. Specifically, this is the part causing the error;
..Matches(source.{ORCgrp(x1).OBRuniongrp.NTEi2(x2):Comment(x3)},"^[A-Z][0-9][0-9]$")


What do I need to change?

1件の新着コメント
ディスカッション (1)2
続けるにはログインするか新規登録を行ってください
お知らせ
· 2025年9月4日

Be Part of Our 10-Year Anniversary Video!

This year, our InterSystems Developer Community turns 10 years old — and we’re inviting YOU to take part in the celebration!

We’re creating a special community video filled with greetings and memories from members worldwide. Want to join in? It’s simple:

▶️ Record a short clip (1-2 mins) where you:

  • Share a favorite highlight or memorable moment from your time in the Developer Community
  • Send your congratulations on the 10th anniversary 🎊

We’ll combine the contributions into one big celebratory video for everyone to enjoy! 🎬✨

👉 Click here to record your video 

It only takes a couple of minutes — just follow the on-screen prompts; no setup is required. Once you’re done, we’ll automatically receive your video.

Don’t miss your chance to be featured in the official 10th anniversary celebration! 🥂

1件の新着コメント
ディスカッション (1)2
続けるにはログインするか新規登録を行ってください
質問
· 2025年9月4日

Need help with getting data from a Zen page property and setting column widths in my dynaGrid

Given the code below, I need help with getting the collected column widths from the Demo.Configuration table and stored in the columnWidths zne page property. As I understand it, I should be able to retrieve it using zenPage.columnWidths in the setColumnWidths or dgRender clientMethods but the alert is showing that it cannot be retrieved as it shows a value of Null. Once I can retrieve those values, then I want to set the widths of the colmns of the dynaGrid according to the values in the ^Demo.Configuration table. The data pulled in from the CSV file that creates ^Demo.Import can have a different included columns depending on the choices of the user.

/// Created using the page template: Title Page
Class Demo.DynaGrid Extends %ZEN.Component.page
{
/// Displayed name of this page.
Parameter PAGENAME = "DynamicDynaGrid";
/// Property to hold column widths
Property columnWidths As %ZEN.Datatype.string;
/// This Style block contains page-specific CSS style definitions.
XData Style
{
<style type="text/css">
/* style for title bar */
#title {
               background: #C5D6D6;
               colorblack;
               font-familyVerdana;
               font-size: 1.5em;
               font-weightbold;
               padding: 5px;
               border-bottom: 1px solid black;
               text-aligncenter;
}
</style>
}
/// This XML block defines the contents of this page.
XData Contents [ XMLNamespace = "http://www.intersystems.com/zen]
{
<page xmlns="http://www.intersystems.com/zentitle="">
<html id="title">Demo: Dynamic Dyna Grid</html>
<spacer height="10"/>
<vgroup width="100%">
<dynaGrid id="dgDynaGrid" OnCreateDataSet="CreateDS"
showColumnLabels="true"
showRowLabels="false"
showZebra="true"
width="100%">
</dynaGrid>
</vgroup>
<!-- gridRow style="text-align:left;"/ -->
<!-- onrender="zenPage.dgRender(zenThis);" -->
</page>
}
ClassMethod CreateDS(pGrid As %ZEN.Component.dynaGrid, pDataSet As %ZEN.Auxiliary.dataSet) As %Status
{
               Set $ZT="Error"
               Kill ^UT("Demo.DynaGrid","CreateDS")
              
               // Clear out data set
               Do pDataSet.%Clear()
              
               // column labels (dimension 2)
               Set tHeader=^Demo.Import("ImportedData",1),colcont=0
               Set colWidths=""
               For p=1:1:$LL(tHeader) {
                              Set colName=$TR($LG(tHeader,p)," ")
                              Do pDataSet.%SetLabel(colName,$I(colcount),2)
                              If colName="Employee" {
                                             Do pDataSet.%SetLabel("CoConsultant",$I(colcount),2)
                              Set colWidths=colWidths_$Get(^Demo.Configuration("ReviewImportData","ColumnWidth","CoConsultant"),"100")_","
                              }
               Set colWidths=colWidths_$Get(^Demo.Configuration("ReviewImportData","ColumnWidth",colName),"100")_","
               }
               Do pDataSet.%SetLabel("Include",$I(colcount),2)
Set colWidths=colWidths_$Get(^Demo.Configuration("ReviewImportData","ColumnWidth","Include"),"100")
              
               // get size of dataSet
               //Set rows = pDataSet.%GetDimSize(1)
               Set cols = pDataSet.%GetDimSize(2)
               // Now populate the data in the new table
               // Do pDataSet.%SetValue(value,row,col)
               For row=2:1 {
                              If '$Data(^Demo.Import("ImportedData",row)) Quit
                              Set rowData=^Demo.Import("ImportedData",row),colcount=0
                              For col=1:1:$LL(tHeader) {
                                             Set val=$LG(rowData,col),cHead=$TR($LG(tHeader,col)," ")
                                             Do pDataSet.%SetValue(val,(row-1),$I(colcount))
                                             If $LG(tHeader,col)="Employee" Do pDataSet.%SetValue("",(row-1),$I(colcount))
                              }
                              Do pDataSet.%SetValue("Yes",(row-1),$I(colcount))
               }
               //
               Set %page.columnWidths = colWidths
               Set ^UT("Demo.DynaGrid","CreateDS","cols")=cols
               Set ^UT("Demo.DynaGrid","CreateDS","colWidths")=colWidths
               Set ^UT("Demo.DynaGrid","CreateDS","%page.columnWidths")=%page.columnWidths
               //Do zenPage.setColumnWidths(pGrid, colWidths)
               //
               Quit $$$OK
Error     //
               Set ^UT("Demo.DynaGrid","CreateDS","Error")=$ZE
               Do ^%ETN
}
ClientMethod dgRender(pGrid) [ Language = javascript ]
{
              
               var colWidths=zenPage.getColumnWidths();
               alert('dgRender:\n\n colWidths = ',colWidths);
               pGrid.columnWidth colWidths;
}
ClientMethod setColumnWidths(pGrid, colWidths) [ Language = javascript ]
{
              
               alert('setColumnWidths:\n\n colWidths = ',colWidths);
}
ClassMethod getColumnWidths() As %String
{
               Set ^UT("Demo.DynaGrid","getColumnWidths","%page.columnWidths")=%page.columnWidths
               Quit %page.columnWidths
}
}

Here is the data:

^Demo.Configuration("ReviewImportData","ColumnWidth","CoConsultant")=110

^Demo.Configuration("ReviewImportData","ColumnWidth","CouponCode")=50

^Demo.Configuration("ReviewImportData","ColumnWidth","Customers")=300

^Demo.Configuration("ReviewImportData","ColumnWidth","Employee")=110

^Demo.Configuration("ReviewImportData","ColumnWidth","Include")=60

^Demo.Configuration("ReviewImportData","ColumnWidth","Note")=300

^Demo.Configuration("ReviewImportData","ColumnWidth","PaymentAmount")=60

^Demo.Configuration("ReviewImportData","ColumnWidth","Service")=200

^Demo.Configuration("ReviewImportData","ColumnWidth","StartTime")=160

^Demo.Configuration("ReviewImportData","ColumnWidth","Status")=100

 

^Demo.Import("ImportedData",1)=$lb("Customers","Employee","Service","Start Time","Payment Amount","Note","Status","Coupon Code")

^Demo.Import("ImportedData",2)=$lb("Mickey Mouse","Adrian Monk","Check-In","April 1, 2025 10:00","50.00","This is a note","Approved","")

^Demo.Import("ImportedData",3)=$lb("Minnie Mouse","Adrian Monk","Check-In","April 4, 2025 10:00","50.00","This is a note","Approved","")

^Demo.Import("ImportedData",4)=$lb("Donald Duck","Adrian Monk","Check-In","April 7, 2025 10:00","50.00","This is a note","Approved","")

^Demo.Import("ImportedData",5)=$lb("Martin Martian","Sharona Fleming","Check-In","April 14, 2025 10:00","50.00","This is a note","Approved","")

^Demo.Import("ImportedData",6)=$lb("Pete Paisano","Adrian Monk","Check-In","April 18, 2025 10:00","50.00","This is a note","Approved","")

^Demo.Import("ImportedData",7)=$lb("Goofy Dogg","Sharona Fleming","Check-In","April 21, 2025 10:00","50.00","This is a note","Approved","")

^Demo.Import("ImportedData",8)=$lb("Mark Mouse","Adrian Monk","Check-In","April 24, 2025 10:00","50.00","This is a note","Approved","")

^Demo.Import("ImportedData",9)=$lb("Popeye Sailorman","Adrian Monk","Check-In","April 25, 2025 10:00","50.00","This is a note","Approved","")

^Demo.Import("ImportedData",10)=$lb("Mickey Mouse","Sharona Fleming","Check-In","April 27, 2025 10:00","50.00","This is a note","Approved","")

 

Thank you

1件の新着コメント
ディスカッション (1)1
続けるにはログインするか新規登録を行ってください