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 mustapah
#794493
PM has a globally-scoped variable (or maybe locally-scope for dynaform script?) called "dyn_uid", which contains the current form UID, BUT this variable is not available in the preview mode of the designer, only for a running case.

How can I get the form UID dynamically in preview mode?
#794500
The DynaForm in preview mode is displayed in this iframe:
Code: Select all
<iframe id="pm-dynaform-preview-iframe" name="pm-dynaform-preview-iframe" style="border: medium none; width: 100%; height: 100%;" src="cases/pmDynaform?dyn_uid=601428611599242245be290087574274&prj_uid=309411410599230e98d5be7091622022">
You can use this JavaScript code:
Code: Select all
if (frames.dyn_uid) { //running a case
   var dynaformId = frames.dyn_uid;
   var processId = frames.prj_uid;
}
else {  //in preview mode
   var dynaformId = location.href.match(/dyn_uid=(.*?)&/)[1];
   var processId = location.href.match(/prj_uid=(.*)/)[1];
}

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]