Scripting

0Replies
How to Decode the URL
Posted on January 31, 2017 1:37 PM by n/AHi Team, To Encode the url we have function ENCODEURL to decode the same what is the function we use?
0Replies
DECODE the URL
Posted on January 31, 2017 1:32 PM by n/AHi Team, To Encode the url we use ENCODEURL function likewise is there a function to DECODE the url?
2Replies
Ajax Update Area Action from Script
Posted on December 9, 2016 9:08 PM by n/ALatest Reply on December 12, 2016 6:19 PM by n/AHello, Can anybody tell me that how can I call an ajax update area action from script? Thanks

1Reply
Use of XML Primitive data types
Posted on December 7, 2016 7:49 AM by n/ALatest Reply on December 9, 2016 11:56 AM by Daniela DorneanuHello i didn't find any suitable examples to use following XML primitive data types. XMLAttr XMLDocument XMLElement XMLNode XMLNodeList XMLNamedNodeMap Can you please provide sample code for it? Thanks Abhijeet

4Replies
Insert XML contents as a node
Posted on December 7, 2016 7:16 AM by n/ALatest Reply on December 12, 2016 3:08 AM by n/AHello I have following code String $newNode := "value"; This value of the new node is from a service and need to be inserted into the XML document as it is. When I am trying to use $newElement.setTextContent($newNode); The final XML contents ...

2Replies
Problem by using the StartProcess in a cloud environnent
Posted on November 30, 2016 4:31 PM by Michaël DegenLatest Reply on December 1, 2016 5:28 PM by Michaël DegenHello, I have a process that create approximately 1'250 processes and take 7 minutes to execute. This process use a script that use the function StartProcess(...). If I run this process with one Appway instance, processes are correctly created. But, If i use two nodes that worked after a ...

5Replies
Checking Headers of a csv upload file
Posted on November 15, 2016 9:44 AM by n/ALatest Reply on November 18, 2016 10:11 AM by n/AHi, This is my problem : I use the "Upload File" component. I would like to check that the headers of the csv have a correct name. How can I check the header of the file ? I use the object type "HttpFileUpload" and the function LOADFROMCSV(InputFile, ...

1Reply
Querying a System Health Service Sensor through a script
Posted on October 27, 2016 10:51 AM by n/ALatest Reply on October 28, 2016 5:01 PM by Ivo PesciaWhat would be the best way forward to achieve this keeping in mind the end goal is to fire off an email alert in case of any sensor state being not "OK". Facing issues like comparing sensor states as do not want to resort to string comparison here.

3Replies
DiscussionPost attributes setting
Posted on October 14, 2016 12:04 PM by n/ALatest Reply on October 17, 2016 4:04 PM by n/AHi all, i'm trying to create a script which, given a context, reads all DiscussionPost objects the context contains and copies their texts into another discussion context. In addition i would like to mark the 'cloned' discussion posts in some way (because i need to identify them later); ...

1Reply
Instantiating a java object in Appway script
Posted on September 2, 2016 5:14 PM by n/ALatest Reply on September 5, 2016 8:17 AM by UrsI would like to instantiate a standard java object (java.net.URL) from within my Appway script - for most classes this would be in the form :- java.net.xxx $object := NEW(java.net.xxx); which would call the constructor for the object to ensure that the instantiated object is correctly initialized. For the ...

1Reply
How programatically Validate function can be called on a Business Object ?
Posted on August 26, 2016 9:18 PM by n/ALatest Reply on August 27, 2016 5:14 PM by n/AHow programatically Validate function can be called on a Business Object ?

3Replies
Get the phase Name of a Workitem
Posted on August 11, 2016 2:45 PM by Michaël DegenLatest Reply on August 25, 2016 9:27 AM by Michaël DegenHello, I'm not able to find how to get the phase name for a workitem that is diplayed in the portal worklist. I have tried on the Workitem object the following methods but they return null: - getPhaseName() - getPhaseDescription() - getPhaseTaskListName() And in the portal worklist, I ...

1Reply
PAUSE method - when to/not use
Posted on August 10, 2016 10:04 AM by Amey PurandareLatest Reply on August 16, 2016 11:30 AM by StephanDue to limitations of threads available to the process engine, use of PAUSE() is strongly advised against. But since it's made available as a script function, there must be a good reason for its existence. When is calling PAUSE() not detrimental to the health of the system, e.g. as a ...

2Replies
How to write a code scanner in appway? like Sonar Code Coverage
Posted on August 1, 2016 12:17 PM by n/ALatest Reply on August 10, 2016 10:44 AM by Amey PurandareHello, I would like to find out if a script function, data class methods are being called from somewhere in my appway setup. i know this is currently can be checked in Data Class by right click > Dependencies, or by Business Object Dependencies > Incoming for ...

2RepliesSOLVED
Dynamic dropdown source
Posted on July 26, 2016 9:43 PM by n/ALatest Reply on July 28, 2016 4:17 PM by n/AIs there a way to dynamically provide a datasource to a dropdownlist object? For instance say you have a dropdown that could be used to select planes or trains. Based on a selection of planes populate the dropdown with various airlines. Or if the user selects trains ...

2RepliesSOLVED
UNION/UNIQUE performance
Posted on July 22, 2016 10:35 AM by n/ALatest Reply on July 27, 2016 1:28 PM by n/AHello everybody, I had some performance problem using the scripts UNIQUE/UNION on very big object collections. I suppose the platform implementation is comparing objects field by field. In my solution it's enough comparing the object ids, so I made a custom UNIQUE/UNION using getId method and performances are ...

1Reply
Download Process as PDF
Posted on July 12, 2016 2:38 PM by n/ALatest Reply on July 14, 2016 11:35 AM by UrsHi, There is an option available to download a process as a pdf/png. However I wanted to ask if there is an Appway script I can achieve that functionality through rather than using the UI. I am looking to trigger this script for different processes. Thank you.

1Reply
Show interline onClick
Posted on July 7, 2016 2:20 PM by n/ALatest Reply on July 11, 2016 10:46 AM by André SpringDear Forum I would like to trigger the opening (show) of the interline of a Data Table when I click anywhere on the row, rather than just on the little triangle. Is there a script function for this that I could use in an onClick script action? or another way ...

1Reply
Calling java your own java utlity method from appway
Posted on July 7, 2016 1:37 PM by n/ALatest Reply on July 11, 2016 3:20 PM by UrsHi I have written java program to compress pdf, i'd like to call that java program(utility method) from Appway, is there way to achieve this?

1Reply
Version filter documentation
Posted on July 5, 2016 3:58 PM by n/ALatest Reply on July 6, 2016 9:06 AM by CateI somehow cannot find a documentation of the VersionFilter type, its different types/features and how they influence Appway, its serialization format, how to create instances etc. Does this exist? If not, could you please provide me with it? Thanks.

7Replies
Search user by first name / last name
Posted on July 4, 2016 2:03 PM by n/ALatest Reply on September 7, 2016 7:45 AM by n/AI need to search users given their first name and last name, only. I could not find a corresponding UserPredicate preference for these fields nor any other efficient way to do this. Since our user base is quite large (currently 50k+), I would like to avoid iterating over all user. ...

1Reply
Dynamic CAST
Posted on July 1, 2016 12:31 PM by PEMALatest Reply on July 1, 2016 3:47 PM by UrsA typical CAST-statement looks something like CAST(type, object). What if I would like to assign the type of the casting object with an assigned variable of a process or look it dynamically up in a catalogue? Somehow this seems not possible. Is there an alternative to CAST or have I ...

2Replies
Dynamically toggle visility when validation errors are present
Posted on June 30, 2016 11:29 AM by n/ALatest Reply on August 10, 2016 2:07 PM by Ricardo GerstlDear Forum I have a Toggle Visibility Area that contains input fields. After the validation phase detects that there are validation errors, the screen is re-rendered. However the corresponding area is hidden (yes, I have set to initially being hidden). I understood that I can script this initial visible state ...

10Replies
Display of Huge Records using Pagination feature.
Posted on June 21, 2016 10:01 AM by n/ALatest Reply on June 24, 2016 12:42 PM by n/AHi Team, I am trying to implement pagination for my application which I need to display huge records(more than 10,000). I have gone through this thread and tried with below link https://developer.appway.com/screen/ShowSingleRecipe/selectedRecipeId/1426907252927 it's good for small set of records but in my case it's huge so can ...

2Replies
How can I get the creation time of a file in Appway
Posted on May 9, 2016 5:37 PM by Simon VerhoevenLatest Reply on May 13, 2016 3:50 PM by Simon VerhoevenI have a path to a local file in the data home in Appway. In the same way that I can run FILESIZE('path/to/file.ext') I want a function to get the files creation date. Thanks, Simon

2Replies
Accessing data class property dependecies by script function
Posted on May 4, 2016 11:45 AM by n/ALatest Reply on May 6, 2016 1:49 PM by UrsDoes exist a way for having data class property incoming/outcoming dependencies list by script function? Thanks in advance

2Replies
Find the index of character in a string
Posted on March 18, 2016 6:46 AM by n/ALatest Reply on March 21, 2016 3:56 AM by n/AHi Do we have a function in appway which can find the index of a character or group of characters in a String? e.g. index of 'a' in apple is 1 index of 'world' in 'hello world' is 7

2RepliesSOLVED
Get all process instances
Posted on January 12, 2016 11:07 AM by Simon VerhoevenLatest Reply on February 19, 2016 3:17 PM by Simon VerhoevenHow can I get a list of all open process instances. It is necessary as I would like to create an autojob that automatically deletes all process instances with no activity for x time. Thanks, Simon

4Replies
Segregating documents
Posted on January 6, 2016 3:32 PM by n/ALatest Reply on February 19, 2016 2:44 PM by CateI have 20 Document ,out of which 10 belong to Part A and 10 belong to part B,How can i filter documents to respective Part? For ex -if Part A -respective 10 doc to be displayed and if Part B then rest 10

1Reply
FILESYSTEMURL and network path
Posted on December 9, 2015 12:24 PM by Ingo GuthmannLatest Reply on December 9, 2015 2:10 PM by UrsHello Can i use FILESYSTEMURL with an network path? I store with Appway uploaded documents on a network path. Then i create a download link with FILESYSTEMURL. If i try to download the file, i always get an 403 (forbidden) error. Example: String $path := '\\\\compx/files/appway/ing/test.txt'; FILESYSTEMURL($path) If ...

4RepliesSOLVED
Calling integration link inside data class multiple time: error
Posted on November 25, 2015 10:25 AM by Michaël DegenLatest Reply on November 25, 2015 5:25 PM by Michaël DegenHello, I'm trying to create a data class containing a call to an integration link. Inside this data class, I create a static function like that: This static function call an integration link. This integration link call a Soap webservice synchronously. If I call one time this ...

4Replies
Fillable PDF - PDFRenderConfiguration
Posted on November 23, 2015 2:37 PM by n/ALatest Reply on August 8, 2016 10:36 PM by Dali LiHi all, I have a PDF provided by the client and I need to do the following: - fill some fields in the PDF with the information retrieved from the process - have other fields manually fillable by the user Is it possible to do it in Appway? ...

3RepliesSOLVED
Script Language: Function Reference
Posted on October 22, 2015 9:12 AM by n/ALatest Reply on January 11, 2016 2:32 PM by CateHi, I am highly interested in the expression / script language capabilities and was therefore happy to find the "Script Language: Function Reference X" documentations. But there are only parts 1,2,3 going from scripts starting with M-Z. What about all scripts starting with A-L ? A ...

5RepliesSOLVED
Exporting business objects as downloadable files
Posted on October 15, 2015 10:59 AM by Amey PurandareLatest Reply on October 23, 2015 10:09 AM by StephanProblem: we have several PDF output objects - which basically are the PDF templates / blank forms. Besides document generation, at times, users also need to download the blank forms, i.e. essentially the PDF output objects. Could you please provide a script which we can use in a screen ...

6RepliesSOLVED
DataClass for use with DataTable
Posted on October 7, 2015 3:40 PM by Matthew SmithLatest Reply on October 8, 2015 6:51 PM by Matthew SmithHello, I am trying to follow this guide Screen Component: Data Table (for 6.2) I have implemented a CustomDataTable model in 5.3 and I am currently trying to understand what will need to be done to migrate this functionality to 6.2.9. I ...

3RepliesSOLVED
Understanding skip phase validate and ajax updates
Posted on September 27, 2015 9:55 PM by Amey PurandareLatest Reply on September 28, 2015 6:05 PM by Amey PurandareAs shown below, I have 3 actions defined on a dropdown. I know, that skip phase needs to be before ajax update, but just to understand how Appway works, I placed it after, to try it out. Default value of all $account fields is blank, which is not allowed by ...

3RepliesSOLVED
CustomDataModel -- Filter ()
Posted on September 23, 2015 11:19 PM by Matthew SmithLatest Reply on September 24, 2015 10:07 PM by Matthew SmithHi, I am trying to follow this article : Screen Component: Data Table (for 6.2) to create a custom data table filter. Our requirement is that we need to have a handle to the collection of filtered records once the filter has been applied to ...

2RepliesSOLVED
Creating custom lists
Posted on September 17, 2015 8:25 AM by n/ALatest Reply on November 4, 2015 8:39 AM by n/AHi there, Is anyone aware of a way to create new custom lists (or even remove existing ones) via script? It seems fairly simple to modify existing ones but not all that intuitive to add new ones. Thanks, Al

2RepliesSOLVED
CREATEPROTOTYPE and NEW
Posted on August 21, 2015 10:40 AM by Ivo PesciaLatest Reply on August 24, 2015 10:44 PM by Ivo PesciaWhat's the difference and it's technical implications if it's not the same between CREATEPROTOTYPE() and NEW().?

1ReplySOLVED
Integration Java API : problem with nested classes
Posted on August 11, 2015 9:45 AM by n/ALatest Reply on August 19, 2015 10:01 AM by MauHi, I need to use classes from an open-source Java library. I've created some primitive types corresponding to the Java classes I want to use with this method : Script Type MyNewClass Begin JavaType fully.qualified.name.of.my.Class; MetaData['AutoConstruct', 'true']; // not sure about this End End It works for ...

7Replies
DataTable: how to use the new "Data Class" source functionality
Posted on July 20, 2015 9:49 AM by n/ALatest Reply on July 21, 2015 11:11 AM by n/AHi, it is not clear to me how to use this new "Data Class" functionality. Is there any example in order to understand how to configure and use it? E.g. the MovieModel referred by the documentation. My case is the following:
- I have a custom Data

1Reply
Updating Catalogue
Posted on June 17, 2015 8:45 AM by n/ALatest Reply on June 17, 2015 1:50 PM by UrsHi all, I am trying to update a static catalgoue by script. The CatalogueUpdate function works well, but is missing some functionality. Is it true that it does not generate missing columns? Usually we did update the catalogues by hand, where you could check the flag create missing columns. ...

1Reply
Parsing xsds
Posted on May 21, 2015 6:12 PM by Simon VerhoevenLatest Reply on June 10, 2015 4:37 PM by CateHow can I parse the following xsds (below) into Appway Data Classes. I ask because I am trying to interface with the following rest service http://documents.epo.org/projects/babylon/eponet.nsf/0/7AF8F1D2B36F3056C1257C04002E0AD6/$File/OPS_v3.1_documentation_version_1.2.14_en.pdf. I have tried to use the XSDToDataClass function but I get the exception attached. XSDS Exception

2Replies
HTTPCOOKIESET and HTTPCOOKIEGET
Posted on May 18, 2015 4:34 PM by Simon VerhoevenLatest Reply on May 20, 2015 11:11 AM by Simon VerhoevenHi I am simply trying to use HTTPCOOKIESET and HTTPCOOKIEGET to temporally store a variable until session time out. If I run the following script in the interactive script editor I get null (and not 'test' which is what I expected) I understand that I ...

1Reply
Invoke inflight process via script
Posted on April 7, 2015 4:13 PM by n/ALatest Reply on April 9, 2015 11:22 AM by Thomas SuterIs there any way to invoke inflight process via script. Let say i have 5 screen in my process, i completed three today and tomorrow i want to complete two. So whenever is it possible to to invoke that inflight process using process so it will directly take me to ...

6Replies
Merge data in big collections
Posted on April 6, 2015 9:44 AM by n/ALatest Reply on April 20, 2015 1:57 PM by n/AHello Appway Community, I have this data-model:
Indexed A $aes; Indexed B $bes;
ForEach $a In $aes Do ForEach $b In $bes Do If $a.email == $b.email Then $a.data := $b.data; End End End

10Replies
Adaptive tab: Determine the selected tab using scripting
Posted on March 20, 2015 2:34 PM by n/ALatest Reply on March 27, 2015 1:42 PM by n/AIs there a way to determine the selected tab of the adaptive tab component? I can set the selected tab using the selected tab property of the adaptive tab component, but I found no way to save the actual selected tab so that I can set this property. Is there ...

1Reply
Data table custom model sort
Posted on March 20, 2015 2:19 PM by n/ALatest Reply on March 24, 2015 10:25 AM by André SpringThe documentation is not clear about sorting using a custom model. How do I get information about the selected column to sort? I could not find an unique identifier to identify the column to be sorted -> The parameter DataColumnModel of the sort method is not documented.

6Replies
Data table custom model calls fetch method after selection of a row
Posted on March 20, 2015 2:06 PM by n/ALatest Reply on May 11, 2015 3:09 PM by CateThe documentation is not clear about selecting a line in a data table if using a custom model: After selecting a row, the fetch method is called to get the selected row based on the actual row number (this seems to be an undocumented feature...). This can result into selecting ...

2RepliesSOLVED
From File to Base-64 content string
Posted on March 12, 2015 8:35 AM by n/ALatest Reply on March 12, 2015 9:12 AM by n/AHello, Is there a built-in function to convert the content of a file given it's path to a Base-64 String? I need to sent uploaded file through a RESTful web-service and I need the content of the file to be converted into Base-64 String. If there is not ...

5Replies
Saving user centric data class instances into the HttpSession
Posted on March 6, 2015 3:48 PM by n/ALatest Reply on March 12, 2015 4:01 PM by n/AI want to save a data class instance (initialized as a local screen variable) into the httpsession on leaving the screen. Is there a standard hook to do something like that?

4Replies
Validate Screen Before the User Clicks Next
Posted on February 23, 2015 6:49 PM by Zvika BadalovLatest Reply on August 27, 2015 6:10 AM by Yeung Jiann TengHello, We are trying to initiate validation when the screen is loaded as opposed to when the user clicks next. I know there is an Appway function called ValidateScreen(), I am just not sure this will help kick in the validation before the next action is processed. ...

3Replies
Mimic behaviour of global search in a solution
Posted on February 10, 2015 6:05 PM by JDLatest Reply on March 16, 2015 8:27 AM by JDDear fellow birds Is there a way to mimic the behaviour of the global search inside a script function? Taking a string value as an input, the function searches all occurrences of this string inside the solution (not only dependencies). This is only for temporary usage inside interactive ...

4Replies
ClusterFile - File renammed with extension .dat
Posted on January 5, 2015 7:08 AM by Sebastien VallonLatest Reply on January 9, 2015 10:22 AM by tschofenHi ! I am using a ClusterFile object to move an uploaded document from the temp folder to a more permanent storage. But as I am copying the file, it is renammed and the extension '.dat' is added to the filepath. However the function getPath() does not revert with the ...

1Reply
Set the DueDate property within a Process
Posted on December 17, 2014 1:00 PM by Ivo PesciaLatest Reply on December 18, 2014 12:00 PM by n/AI am modeling a process and want to set the DueDate Property on the WorkItem to display this information in my Portal Worklist. How exactly is this done?

1Reply
Use Testdata in "custom" scripts
Posted on November 26, 2014 5:30 PM by n/ALatest Reply on November 28, 2014 5:14 PM by n/AHi, we want to use predefined testdata (i.e. available in Library - Test Data) in a script inside a screen/process => the concrete use case is to generate html via GetScreenHTML() and pass in some (optional) parameters (for which we want to use the testdata). I tried a bit ...

8Replies
Integer - Zero Initialization
Posted on November 21, 2014 11:29 AM by n/ALatest Reply on November 27, 2014 1:37 PM by Thomas SuterHi, Why does Appway initialize Integers with 0 instead with null? Normally as a developer we know Integer can be null, if the wrapped int isn't set to any number and an int is by default 0, when it gets initialized. So please, could you enlighten ...

7Replies
Initialize tablesorter after ajax update
Posted on November 20, 2014 4:17 PM by Francesco LoschiavoLatest Reply on November 27, 2014 10:01 AM by André SpringHi, is there a way to fire up a js-code to reinitialize the tablesorter after the table was changed by an ajax update? I only know of the HTML Head and Body Script component. The first is loaded once in the head section and the second on the ...

3Replies
replacement variables within Label text
Posted on November 20, 2014 11:13 AM by n/ALatest Reply on January 21, 2015 11:11 AM by n/AI' m using Labels to provide internationalized text. Is it possible to use variables in the text which For example i have a label 'TestReplace' which has english translation 'Replace {var} with VAR', which when i run: String $translatedText := TRANSLATE('[LABEL:TestReplace]','en'); String $replacedText := REPLACE($translatedText, '\{var\}', 'VAR');

1ReplySOLVED
Delete Process & BAM entry
Posted on November 10, 2014 2:53 PM by n/ALatest Reply on November 10, 2014 4:17 PM by LauraWhen deleting a process from the console it will also set the BAM entry to Cancelled automatically. When scripting the delete of a process the BAM is not automatically updated. Ex: CONTEXT().getWorkflowInstanceService().deleteWorkflowInstance($procid); To cancel the BAM we had to use an SQL call to update the BAM ...

6Replies
Request for Enum and linkedlist
Posted on November 5, 2014 4:57 PM by Matt BarthLatest Reply on May 14, 2015 4:15 AM by MauCan we get linkedlist and Enums built into appway. Enums would make it easier for validation. LinkedList is needed for keeping information in the correct order in O(1) time. Yes I can build my own linkedlist, but i rather depend on java. Or can I directly use java's library for ...

2Replies
Pulling total instances based on specific token
Posted on November 4, 2014 1:00 AM by n/ALatest Reply on November 4, 2014 2:59 PM by n/AWe have instances which are failing at last save point. Is there any way to get total count if it;s failing on last save point. I have attached file where you will see "Screen Task 3:NAS Save failed". Is it possible to extract this token ?

3Replies
Kill the token
Posted on November 3, 2014 4:03 PM by n/ALatest Reply on November 6, 2014 3:15 PM by n/AHi, I'm looking for a solution to kill the current token in a subprocess. Not suitable solution: to link to an End Point, as the current token will direct in the parent process and therefore, I have to modify the upper process, which is not good. So,is ...

6RepliesSOLVED
Submit before redirect
Posted on October 28, 2014 4:16 PM by n/ALatest Reply on November 6, 2014 2:30 PM by n/AHi, What I have to do: 1. click on a Link/Link Container/ component that makes action to Display Workitem/ Display Process or Display Subprocess 2. data on the screen must be submit 3. page is redirected to the new link by an screen action. I'm missing the ...

2RepliesSOLVED
email regex
Posted on October 20, 2014 4:42 PM by Matt BarthLatest Reply on November 5, 2014 11:25 AM by Thomas SuterI know that the built in email validation is not that strong. Here is a piece of regex for those who need a bit stronger validation for their clients. It was pulled from the web seems to be working so far. '[a-z0-9!#$%&\'*+/=?^_\'{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_\'{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?');

2RepliesSOLVED
Set headers on rest client
Posted on October 9, 2014 1:19 PM by n/ALatest Reply on April 7, 2015 8:31 AM by n/AHello I am using rest client to make a call to rest service. Could you please tell me how should I set headers on restclient? Thanks Abhijeet

4Replies
http response header + open/save dialog + multiple files
Posted on October 1, 2014 11:29 AM by n/ALatest Reply on September 12, 2016 7:52 PM by n/ADoes appway currently allow only one file to be opened in a dialog box (open/save/cancel)? is this a limitation for now. Any work around .?

1ReplySOLVED
Knowing state of integration link
Posted on September 29, 2014 2:31 PM by n/ALatest Reply on September 30, 2014 6:10 PM by Thomas SuterHi, In our application we are using a number of integration links. Is there any way to know how many integration links are up or down at any time without looking in integration link console? It'll be very helpful if we know the current state of all the integration links ...

2RepliesSOLVED
What purpose has the SqlClose() function?
Posted on September 29, 2014 1:30 PM by Thomas SchaerLatest Reply on October 1, 2014 8:13 AM by Thomas SchaerIn a context associated connection, SqlCommit() and SqlRollback() already invoke a close call. Is the SqlClose() function therefore still needed or not?

2Replies
Reverse functionality to SPLIT()
Posted on September 25, 2014 5:03 PM by Tom WeberLatest Reply on November 26, 2014 4:00 PM by CateI was looking couple times what the 'opposite', 'reverse' function is for SPLIT(). Finally found it: JOINLIST() Maybe it would be helpful to remark that in the 'Examples' of the function description?

2RepliesSOLVED
Creating XML Document through scripts
Posted on September 23, 2014 8:37 AM by n/ALatest Reply on September 23, 2014 11:24 AM by n/AHello, I am trying to create an XML Document using appway. I am using following code It's always giving me 'Couldn't create document'... When I try to do like The output is <?xml version="1.0" encoding="UTF-8"? > <abc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> The code is ...

6RepliesSOLVED
How to change the content of a catalog programmatically?
Posted on September 17, 2014 4:53 PM by Francesco LoschiavoLatest Reply on September 18, 2014 11:22 AM by Francesco LoschiavoHi, We would use a catalog for drawing a form. From time to time we have to update, add new or remove deprecated fields. Is there a way to do this with a script / function? I found in the forum a function called "CatalogueUpdate()", but could not find ...

2RepliesSOLVED
LANGUAGE() function returns different results on apparently same systems
Posted on September 11, 2014 11:19 AM by CarmineLatest Reply on September 11, 2014 1:29 PM by CarmineWe work on clients systems which all are setup the same way. On one system the LANGUAGE() function return 'en' and on the other system the same function call returns 'en_US'. Why?

2Replies
Change the value of a configuration property via a screen
Posted on August 27, 2014 2:32 PM by Ivo PesciaLatest Reply on November 10, 2014 3:31 PM by Falk LademannI want to implement a screen which allows me to change the value of a Configuration Property. Can be either a Server Configuration Property or a Content Configuration Property. Is that possible from with a Screen/Script?

1ReplySOLVED
Find a component from its Component Path
Posted on August 26, 2014 12:22 AM by Dali LiLatest Reply on September 25, 2014 10:06 AM by StephanGiven a component path, for example, SCREENSTATE().getErrorComponentPaths(). Is there any way to find out which component it really is?

2RepliesSOLVED
Get the list of installed extensions
Posted on July 28, 2014 3:57 PM by Giorgio LupariaLatest Reply on August 1, 2014 10:51 AM by Giorgio LupariaHi We need to get the list of installed extensions' names to generate a custom Screen listing them with their status (running / not running). CONTEXT().getAdapterService().getAdapters() seems to return only running Extensions, is there a way to obtain the full list without incurring in validation errors for the script and ...

6RepliesSOLVED
Initializing a client-side Outlook email with attached document
Posted on July 23, 2014 9:11 AM by n/ALatest Reply on August 12, 2014 4:47 AM by n/AHi, Is it possible to trigger a user's outlook email with an attached document within a workflow? I have explored 2 options but they do not fully fulfill my requirements. 1. Using mailto URL link, however this has a length limitation of 2000 char and ...

4RepliesSOLVED
CAST warning me about insecure Casting
Posted on July 21, 2014 1:36 PM by Ivo PesciaLatest Reply on July 22, 2014 9:01 PM by Ivo Pescia(Version used: Appway 6.1.1) Use case: I set an indexed String as user preference, then try to retrieve this list. the function USER().getPreference() returns a java.io.Serializable Object which i then want to convert back to an Indexed String. Sample: I get a Warning saying: CAST: ...

1Reply
Function for checking process message queues?
Posted on July 16, 2014 9:00 PM by John MulliganLatest Reply on July 17, 2014 12:16 PM by n/AThe opposite of the function SendProcessMessage(). Is there something to check for a message or retrieve a specifically addressed message from the queue? I wasn't able to find it, so I apologize in advance if I overlooked something. Example Use Case: A parent process has one last screen ...

2RepliesSOLVED
StartProcess and variables assignment
Posted on July 16, 2014 7:41 PM by GiuseppeLatest Reply on July 17, 2014 2:09 PM by UrsHi, In the following case: Process p1 starts a new process p2 assigning a complex object o1 as a variable. p2 is started using the script function "StartProcess" passing o1 in the namedCollection that is the third parameter of the function. Can I assume that ...

1ReplySOLVED
which name shall I use when I manually create a document action
Posted on June 27, 2014 6:35 PM by n/ALatest Reply on July 11, 2014 10:34 AM by UrsI try to manually create a document actoin. However, the document name show up as 'N/A' also, the active or not setting doesn't show up. Shall I use $params['title'] or $params['documenttitle'] and how do I set the document as not active. $params['Active'] := 'false' ? Action ...

3RepliesSOLVED
Is there a way to stop and restart all integration links at once?
Posted on June 23, 2014 9:21 PM by Dali LiLatest Reply on June 24, 2014 4:58 PM by n/AIs there a way to stop and restart all integration links at once?

2RepliesSOLVED
How do I convert user Roles (set) to Indexed String?
Posted on June 23, 2014 6:39 PM by n/ALatest Reply on June 24, 2014 8:01 PM by n/A

5RepliesSOLVED
Is there any extension that can enable Unit Test of Appway script functions
Posted on June 15, 2014 9:16 AM by n/ALatest Reply on August 10, 2015 4:53 PM by n/AWe are considering unit test all our script functions, is there any appway extension that can enable us to do this? e.g. we need Appway API such as AssertNull, AssertEqual, AssertException etc to enable our Unit Test of script functions.

2RepliesSOLVED
UseValueStore() is deprecated in Appway 6. What would be a proper replacement of this function?
Posted on June 13, 2014 3:08 PM by Dali LiLatest Reply on June 13, 2014 3:50 PM by n/AThe UseValueStore() function is deprecated in Appway 6. What would be a proper replacement of this function? And what is the difference if there is any.

4RepliesSOLVED
Get the list of last commited versions
Posted on May 23, 2014 6:00 PM by n/ALatest Reply on May 26, 2014 6:18 PM by n/AWhat is the best way to get the list of the last commited versions using scripting, similar to the list in the dropdown of the deployment/export window of the studio ? It is possible to get that list using the JAVAEXEC() function to access the CommitListService, but is ...

1Reply
Data binding with list variables
Posted on May 15, 2014 10:02 AM by n/ALatest Reply on May 15, 2014 10:30 AM by n/AHi, I have a data class 'People' of list type and in the screen , I have texts named Person1, Person2,Person3... all of type People. How will I do the data binding for this? Thanks

1ReplySOLVED
Hardcoding of Indexed dataclasses
Posted on May 15, 2014 9:58 AM by n/ALatest Reply on May 15, 2014 10:23 AM by n/AHi, What is the correct way of hardcoding an indexed element. Please help me with a sample script. Thanks

1ReplySOLVED
How to check whether a given BusinessObject is in a CustomList using script
Posted on May 14, 2014 6:47 PM by n/ALatest Reply on May 15, 2014 11:33 AM by n/AI would like to create one CustomList using expression. This custom list will also exclude objects from other exclusion lists. Now I face the problem of how to decide whether a given BusinessObject belongs to an exclusion list. I need to support both Custom list and smart list. ...

2Replies
Data Class binding
Posted on May 14, 2014 8:05 AM by n/ALatest Reply on March 31, 2015 12:07 PM by CateHi, I have a dataclass request which has data classes (request1 , request2,request 3) inside the main data class request. While creating the main data class request , I have created a function NEW inside it which is as follows : /** Description of function 'NEW'. @param ...

3RepliesSOLVED
Data class to XML
Posted on May 9, 2014 7:59 AM by n/ALatest Reply on September 16, 2014 9:04 AM by Thomas SuterHello, Please help me in conversion of data class to XML through script. I tried the following script : Person $P := NEW(Person); String $result := DataEntityToXml($P); PRINT($result); but , this script gives the output as [#document:null]. Thanks.

4RepliesSOLVED
Convert Named to Indexed
Posted on April 9, 2014 12:44 AM by Ivo PesciaLatest Reply on January 16, 2015 2:38 PM by n/AWhat's the elegant way to transorm a Named Collection to a Indexed Collection? (knowing i'd 'lose' the keys)?

2RepliesSOLVED
ConcurrentModificationException possible?
Posted on April 7, 2014 5:06 PM by Lorin SchoopLatest Reply on April 7, 2014 5:31 PM by Lorin SchoopDear Appway experts If I iterate over an indexed collection in Appway and remove elements while iterating, could this lead to a ConcurrentModificationException like in Java? Thanks a lot! Cheers, Lorin

6RepliesSOLVED
Dynamic binding
Posted on April 3, 2014 4:53 PM by n/ALatest Reply on April 24, 2014 9:54 AM by n/AIs there a way to bind dynamically a variable ? Something like $myObject.$var. For example, $myObject.one, $myObject.foo, $myObject.bar where one,foo,bar is originally contained in a variable Thanks

6RepliesSOLVED
Default script parameter evaluation
Posted on April 1, 2014 5:05 AM by n/ALatest Reply on April 1, 2014 2:15 PM by n/AHi, I'm having some trouble with a script function which appears to be evaluating the default parameters of the function even though a parameter is being passed to the function as well. The function is defined as something like the below: However, if I call this ...

1ReplySOLVED
Share Appway Snippets
Posted on March 31, 2014 2:48 PM by Luca BellancaLatest Reply on April 1, 2014 12:16 PM by Luca BellancaHi all, I need to share my Appway snippets from the Script Editor with other developers but I didn't find the Appway functionality to do this. When I use the Script Editor or Interactive Script I can add my own snippets in the snippets section: And ...

5RepliesSOLVED
Displaying a pdf using pdf viewer component
Posted on March 28, 2014 12:44 PM by n/ALatest Reply on January 12, 2015 10:43 AM by UrsHi, Have uploaded the pdf file using the File Upload functionality. Have also moved the file to some other location from the temp folder. Now I need to display this pdf file to the Approver so that he/she can verify the data against the data entered by Client ...

2RepliesSOLVED
List of active and running processes
Posted on March 28, 2014 12:16 PM by Falk LademannLatest Reply on April 11, 2014 6:14 PM by StephanHello, I have a bunch of active processes running for a minute or so in the background. This is meant to be really running processes, doing something without user interaction. They are not blocking the UI (detached via a 1s Timer) but I'd like to make the user become ...

7RepliesSOLVED
Basic encryption function
Posted on March 11, 2014 11:09 AM by n/ALatest Reply on October 20, 2014 11:11 AM by n/AHi! We need to add quickly a new field in one of our screen to store a sensitive value. To avoid having clear values stored in the file system, we need a basic encryption/unencryption function that we would use when binding the field to the DataClass attribute. Is there ...

3RepliesSOLVED
DataArray to Indexed conversion Validation Error
Posted on March 4, 2014 12:20 PM by MarioLatest Reply on April 11, 2014 5:52 PM by StephanHi, I'm dealing with a script that gives a validation error about the conversion from a DataArray object to a Indexed List. Despite this validation error message the script is executed correcly and there's no runtime error triggered. I tried to get rid of this error ...

0RepliesSOLVED
AGE() function
Posted on February 10, 2014 10:44 AM by Christophe SuterIf somebody needs the age function the following answer might help: Q: Where is the AGE() function mentioned in the documentation? A: AGE() is depreciated since Appway 5.1.1.c and is only available in Appway 5.2 and 5.3 if the compatibilty mode has been activated. Possible implementation for an ...
4RepliesSOLVED
TODAY().getYear() - Deprecated. What to use instead?
Posted on January 29, 2014 10:21 AM by Ivo PesciaLatest Reply on March 17, 2015 9:39 AM by StephanThe deprecated function should be replaced by what as per best practices? DATEFORMAT(TODAY(), 'yyyy') comes to mind (would need to convert from string to integer though if integer is needed.

2RepliesSOLVED
Creation of a Text-File
Posted on January 14, 2014 8:40 AM by Christophe SuterLatest Reply on January 14, 2014 1:37 PM by Christophe SuterHi What is the best-practice approach to create an ini-file with Appway's functionality? WRITETEXTFILE()?

1ReplySOLVED
Data class version of a data class instance
Posted on January 13, 2014 2:39 PM by n/ALatest Reply on January 13, 2014 3:39 PM by n/AAssume the following code: What version of MyClass.method will be invoked, the one seen by version filter A or B? That is, is an instance of a data class tied to a particular data class version or is the current version filter used to grab the corresponding version of ...

1ReplySOLVED
UpdateProcessInstance
Posted on November 19, 2013 5:18 PM by n/ALatest Reply on November 20, 2013 8:56 AM by StephanWhat is the default value of the $timestamp parameter of the UpdateProcessInstance function? The inline description is silent about this. I assume the process instance is updated asynchronously independently of what timestamp is specified (in the future or not). Is that correct?

3RepliesSOLVED
Short-circuit evaluation of boolean operators and functions
Posted on November 15, 2013 3:25 PM by n/ALatest Reply on November 15, 2013 5:25 PM by StephanDo Boolean operators (&&, ||, and, or, ...) perform short-circuit evaluation? What about the corresponding functions (OR, AND,...)? If they are normal functions, the answer is naturally no. But if not...

3RepliesSOLVED
ISA with primitive types
Posted on November 15, 2013 2:41 PM by n/ALatest Reply on November 15, 2013 3:39 PM by StephanDoes ISA work with primitive types? Its description suggests that it might work with data classes only.
Return true if argument 1 is an instance of the class given in argument 2.

4RepliesSOLVED
Definition of TypeOf
Posted on November 15, 2013 1:57 PM by n/ALatest Reply on December 16, 2013 11:58 AM by Thomas SuterCould someone please elaborate on what TypeOf does and what it accepts as argument? It seems that for primitive types the result depends on how the argument is passed to the function. returns , whereas returns even throws an exception (com.nm.exprlang.DefaultConverter$Unconvertable cannot be cast to ...

1ReplySOLVED
Behavior of CAST
Posted on November 15, 2013 1:35 PM by n/ALatest Reply on November 15, 2013 2:27 PM by StephanWhat is the exact behavior of CAST? What if the argument cannot be cast, because it is not of the specified type?

3RepliesSOLVED
Groups and Roles
Posted on November 13, 2013 10:27 AM by n/ALatest Reply on November 13, 2013 1:27 PM by StephanHello, It's possible in the Interactive Script Editor to create Groups and Roles ? Avoiding to create one by one in the Studio. Thanks

7RepliesSOLVED
Adding Examples to view in Lookup of Script functions
Posted on September 27, 2013 5:12 PM by Amruta DongreLatest Reply on October 8, 2013 12:15 PM by n/AHow can we add examples to the header of a script function written in Appway by which it will be displayed when the script function is looked up in the sidebar of the interactive script editor? Currently we have the ability to add description, parameters and return values which are ...

2RepliesSOLVED
Long-running script execution from interactive script editor
Posted on September 23, 2013 2:04 PM by n/ALatest Reply on September 23, 2013 3:53 PM by Thomas SuterWe have the problem that a script started from the interactive script editor terminated after approximately an hour, although it should have continued for several hours. We found no reference to the termination of the script execution in the logs. Another instance of the same script has been running more ...

5RepliesSOLVED
Check if a user is currently working on a Workitem
Posted on September 23, 2013 6:05 AM by Till TondiLatest Reply on September 24, 2013 2:18 PM by Till TondiI'm building a "take ownership" function. In the script, which executes the reassignment, I want to check if the other user is actively working on the Workitem at the point of the reassignment . This check should prevent the current owner from getting an error message or losing data on ...

3RepliesSOLVED
SetColumnFilterValue()
Posted on September 20, 2013 3:33 PM by n/ALatest Reply on October 3, 2013 4:03 PM by n/AI'm trying to get the SetColumnFilterValue() working to set a default filter on a Worklist, however it is not working. I have implemented the Local String $jsFilterCode := SetColumnFilterValue('wl_12345678', 'col_1234', 'subProcess', true) in a script on the screen, however it is not doing anything. Do I ...

5RepliesSOLVED
How to Invoke script from outside
Posted on August 28, 2013 3:06 PM by n/ALatest Reply on September 10, 2013 10:53 AM by Thomas SuterHi, I have one script function which take opty id as parameter. Function PushPendingApprovals(String $opportunityID) : Nothing Begin Local String $optyId := $opportunityID; PRINTLN(' ----- '); PRINTLN(' STARR Opportunity'); PRINTLN(' ----- ...

8RepliesSOLVED
Get the Name of a Process Business Object when having the Workitem Object
Posted on August 7, 2013 10:50 PM by Ivo PesciaLatest Reply on August 8, 2013 1:47 PM by Ivo PesciaI have the Workitem and want to find out it's Business Object Name. I can easily get the Id with $workitem.getWorkflowId() How can i get the Workflow Name?

5RepliesSOLVED
ProjectMessage: Function to retrieve all mentioned users?
Posted on August 6, 2013 2:04 PM by Thomas SchaerLatest Reply on August 8, 2013 9:21 AM by Emilie BoillatI would like to know if it's possible to get the mentioned users out of a ProjectMessage object's text attribute. For example, if there's an assignment to me like Emilie Boillat (boillat): Please change font size, @schaer ! I would like to extract the user info but I ...

2RepliesSOLVED
5.2.3.6 - Accessing catalog source type using id
Posted on July 23, 2013 6:32 PM by Simon VerhoevenLatest Reply on July 24, 2013 2:56 PM by Simon VerhoevenI would like to access the the source type of a catalog given it's id (weather it is static, data source ect...). Something like the following. If (ExistsBusinessObject('Catalog', $catalogID)) Then CATALOGTYPE $catalog:= CAST(CATALOGTYPE, GETBUSINESSOBJECT('Catalog', $catalogID).deepClone()); ...

2RepliesSOLVED
Propagate function from Console to Script Language
Posted on July 22, 2013 10:50 AM by Alessandro TortelliLatest Reply on July 23, 2013 7:05 PM by Alessandro TortelliCiao, I've to update a set of workflows to the current timestamp via script editor (Appway 5.1). Is there a way to replicate the "Propagate" function available in the console in the script editor? So far I've a function to set the workflow timepstamp. Or shall I apply the same ...

1ReplySOLVED
Detecting the caller of a function
Posted on July 12, 2013 4:02 PM by n/ALatest Reply on July 15, 2013 11:14 AM by n/AI want to detect the caller of a function from within the called function. How can I do that?

4RepliesSOLVED
Exception wrapping in ThrowJavaException and RethrowJavaException
Posted on July 9, 2013 9:36 AM by n/ALatest Reply on August 28, 2013 11:14 AM by n/AThe documentation of ThrowJavaException and RethrowJavaException state:
Please note that if this Exception is not a RuntimeException, it will be wrapped with an NmRuntimeException.

3RepliesSOLVED
How to re-throw an exception in Appway script
Posted on July 9, 2013 8:26 AM by Eugene HoLatest Reply on July 15, 2013 11:34 AM by n/AIn the Try catch block, I am able to catch an exception and perform the necessary handling. After that I would like to re-throw the exception for the parent function to handle. Is this possible in Appway 5.1?

1ReplySOLVED
Setting the language for expanding tables in pdf render configuration - 5.2.3.6
Posted on July 4, 2013 6:23 PM by Simon VerhoevenLatest Reply on July 11, 2013 9:35 PM by Ivo PesciaI have a set of rules that create pdf generation actions. These actions are then merged to create one action to generate one large pdf document. The pdf document titles are set to labels in Appway (eg: '[LABEL:DOCUMENT_TITLE-MBC_J100]'). My problem is the bookmark structure in the generated pdf comes ...

2RepliesSOLVED
Accessing Java class variables/static fields
Posted on June 27, 2013 11:17 AM by n/ALatest Reply on July 8, 2016 9:54 AM by n/AIs there any decent way to access a class variable/static field of a Java class? For example, if I wanted to access of , I would write . However, this returns a validation error:
Class com.nm.sdk.data.workflow.runtime.tokens.WorkflowToken.STATUS_ACTIVE not found.

4RepliesSOLVED
Create labels from Soap Service Call - Version 5.2.3.3
Posted on June 21, 2013 2:38 PM by Simon VerhoevenLatest Reply on July 5, 2013 9:43 AM by Simon VerhoevenHi I have a Soap Service Call which returns records with two attributes and . I would like to iterate through these records and create label business objects with ids of question. and 'Translation to language "en" 's equal to . If a label of such id ...

2RepliesSOLVED
How to test for identity?
Posted on June 10, 2013 2:47 PM by n/ALatest Reply on June 10, 2013 3:19 PM by n/A== in Appway script apparently tests for equality. How can I test for identity, that is, if two references are the same (like the == operator in Java)?

6RepliesSOLVED
Renaming business objects from script
Posted on May 31, 2013 4:29 PM by Lorenz GrafLatest Reply on April 12, 2018 2:47 PM by Rossella RapisardaHello For a solution I working on, we have for each business object (data class, scriptfunction, screen...) a specific prefic in its name. e.g. for a country specific prefix "EURO" or "ASIA" that results in names like ASIAAccount or ASIACreateCustomer, EUROCreateCustomer and so on. Now unfortunately I ...

4RepliesSOLVED
Logging debug in 5.3-dev standalone build
Posted on May 14, 2013 5:41 PM by Simon VerhoevenLatest Reply on July 4, 2013 12:10 PM by n/AHi I have been following some fundamental training on scripts and have read how you can the LOGGER function to help debug scripts. My problem LOGGER('debug', 'HELLO WORLD') does not show in the debug.log file (Administration->Logging->Logs) LOGGER('info', 'HELLO WORLD') does also not work LOGGER('error', ...

2RepliesSOLVED
[Studio-Administration] - Howto enable Script Language performance monitoring
Posted on April 19, 2013 5:38 PM by MarioLatest Reply on April 22, 2013 10:56 AM by MarioI'm currently working on wire-dev platform and I changed the code of an Appway function to make it more efficient. I'm curious to know if my change has affected the running time of such function and I know I could do it looking at the "Script Language" section of ...

4RepliesSOLVED
Upload recouces in to Appway dynamicaly from local dive
Posted on April 19, 2013 9:57 AM by Till TondiLatest Reply on June 21, 2013 9:42 AM by StephanI have 100 icons on my local dive which I need to upload in to Appway. Instead doing this mutually, can someone provide me a script which uploads the images and creates BOs in Appway. Thanks a lot!

1ReplySOLVED
Allowed values for completeAction in ProcessStartURL()
Posted on April 8, 2013 2:13 PM by n/ALatest Reply on April 12, 2013 5:02 PM by LukasCan someone list the allowed values for $completeAction argument in ProcessStartURL() function. I am trying to build a link within a screen in a Process (Process1) to launch a Process (Process2)with swimlanes, so when a swimlane is crossed the original Process (Process1) should be launched.

4RepliesSOLVED
Change scope variable in Template
Posted on April 5, 2013 10:52 AM by Christian WiederseinerLatest Reply on November 19, 2013 7:23 PM by StephanI d'like to change the value of the $showNextButton Boolean variable in an active process instance using UseValueStore() (see picture). But I got some errors telling me the variable is not defined. I am able to change the variable in the "Process Instance Scope", but not in the ...

3RepliesSOLVED
Meta-documentation for script functions
Posted on March 21, 2013 3:41 PM by n/ALatest Reply on March 25, 2013 3:15 PM by n/ACould you provide a documentation for the (Javadoc-like) documentation mechanism for script functions? In particular, I am interested in how I can add an 'Example' expression to a parameter documentation, as in the following snippet taken from the documentation of EVAL().
$expressionString (String) the string with the expression that

4RepliesSOLVED
Parallel Execution
Posted on March 20, 2013 5:29 PM by n/ALatest Reply on August 21, 2015 1:22 PM by StephanI have the need to run multiple instances of a script function in parallel. The script language currently doesn't support parallel execution of scripts. What are the best strategies to address such a need? The options I have at the moment are: 1) implementing the function I need to run ...

4RepliesSOLVED
How to get the first N characters of a string
Posted on March 15, 2013 8:27 AM by Thomas SchaerLatest Reply on March 15, 2013 11:33 AM by Simon UmbrichtA.k.a the first N words of a text. How should this be done that it's fast, efficient and easy to implement? The only thing that comes to my mind is to use the SPLIT function, look for whitespaces and then use a Stringbuilder and iterate 50 times in order ...
