Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By HeshanKaru1994
#824659
Capture.PNG
Capture.PNG (9.33 KiB) Viewed 2567 times
If we have situation like this and we need to create 3 different input documents when a user submits a request, can we bypass showing them the input documents page when case runs
User avatar
By amosbatto
#824667
You can add a condition that determines whether a step is executed in a task. For example:
AddConditionInStep.png
AddConditionInStep.png (47.02 KiB) Viewed 2557 times


You will have to use a trigger which is fired beforehand to set the value of the @%numberFiles variables. If you unsure whether the files have been uploaded or not, you can use trigger code like this:
Code: Select all
$caseId = @@APPLICATION;
$sql = "SELECT * FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND APP_DOC_TYPE='INPUT' AND
    APP_DOC_STATUS='ACTIVE'";
$aFiles = executeQuery($sql);
@%numberFiles = count($aFiles);


If you want to search for particular Input Documents, then use this trigger code:
Code: Select all
$caseId = @@APPLICATION;
//set the IDs of Input Documents:
$inputDocs = "'6367801425ce612cf874c77005570234', '1969334975ce4b292c10685077270096', '4940937105ce4b2d3d315e2026819365'";
$sql = "SELECT DISTINCT DOC_UID, APP_DOC_UID, DOC_VERSION FROM APP_DOCUMENT 
    WHERE APP_UID='$caseId' AND APP_DOC_TYPE='INPUT' AND
    APP_DOC_STATUS='ACTIVE' AND DOC_UID IN ($inputDocs) GROUP BY DOC_UID";
$aFiles = executeQuery($sql);
@%numberFiles = count($aFiles);
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]