Summary

The local command retrieves the string property value assigned to the ‘name’ parameter. The local command can be used to call any App Property or any property defined in the script itself.


Attributes

  • none

Parameters

  • one string command


Note: A script should not set a local property's value to " (blank).


Example

<script scriptId="local">
    <body>
    
        <s:local>
            <s:stringPath path=":value"/>
        </s:local>
        
    </body>
    <target typeId="localName"/>
</script>

Example – using local to call App Property

<script scriptId="SAEEmailTrigger"> 
    <body> 
        <s:if> 
            <s:and> 
                <s:isSet> 
                    <s:question> 
                        <s:question path=".aesev"/> 
                    </s:question> 
                </s:isSet> 
                <s:isSet> 
                    <s:question> 
                        <s:question path=".aerel"/> 
                    </s:question> 
                </s:isSet> 
                <s:or> 
                    <s:eq> 
                        <s:stringPath path=".aesev:value"/> 
                        <s:string value="3"/> 
                    </s:eq> 
                    <s:eq> 
                        <s:stringPath path=".aesev:value"/> 
                        <s:string value="4"/> 
                    </s:eq> 
                </s:or> 
                <s:or> 
                    <s:eq> 
                        <s:stringPath path=".aerel:value"/> 
                        <s:string value="2"/> 
                    </s:eq> 
                    <s:eq> 
                        <s:stringPath path=".aerel:value"/> 
                        <s:string value="3"/> 
                    </s:eq> 
                    <s:eq> 
                        <s:stringPath path=".aerel:value"/> 
                        <s:string value="4"/> 
                    </s:eq> 
                </s:or> 
            </s:and> 
            <s:email> 
                <s:to> 
                    <s:if> 
                        <s:eq> 
                            <s:environment/> 
                            <s:string value="Staging"/> 
                        </s:eq> 
                            <s:list> 
                            <s:string value="emailtriggers@fountayn.com"/> 
        
                            </s:list> 
                            <s:list> 
                                <s:string value="dtnotify@fountayn.com"/> 
   
                            </s:list> 
                        </s:if> 
                    </s:to> 
                    <s:from> 
                        <s:string value="no-reply@fountayn.com"/> 
                         
                    </s:from> 
                    <s:subject> 
                        <s:concat> 

                            <s:local> 
                                <s:string value="study"/> 
                            </s:local> 

                            <s:string value=" AE Reported: Site #"/> 
                            <s:toolName/> 
                        </s:concat> 
                    </s:subject> 
                    <s:body> 
                        <s:concat> 
                            <s:string value=" A subject has experienced an Adverse Event. Please see the following for more information. n"/> 
                            <s:string value="Site #: "/> 
                            <s:toolName/> 
                            <s:string value="n"/> 
                            <s:string value="Subject #: "/> 
                            <s:stringPath path="/enroll.subid:value"/> 
                            <s:string value="n"/> 
                            <s:string value="Adverse Event: "/> 
                            <s:stringPath path=".aeeven:value"/> 
                            <s:string value="n"/> 
                            <s:string value="n"/> 
                            <s:string value="Please note: If any information is missing it is because it was not filled out and saved in the eCRF.  "/> 
        
                        </s:concat> 
                    </s:body> 
                </s:email> 
            </s:if> 
        </body> 
        <target typeId="aesev" action="update" shouldReconcile='false' when="after"/> 
        <target typeId="aerel" action="update" shouldReconcile='false' when="after"/> 

Example – using local to call Properties in the Script

script scriptId="screening_number"> 
    <body> 
        <s:if> 
            <s:ne> 
                <s:substr> 
                    <s:toolName /> 
                    <s:number value="5" /> 
                    <s:number value="3" /> 
                </s:substr> 
                <s:string value="DDE"/> 
            </s:ne> 
            <s:if> 
                <s:not> 
                    <s:isSet> 
                        <s:question> 
                            <s:question path="/enrollment/SCRNUM.SCREENID" /> 
                        </s:question> 
                    </s:isSet> 
                </s:not> 
                <s:list> 
                    <s:incrementProperty> 
                        <s:name> 
                            <s:string value="scr_Id"/> 
                        </s:name> 
                        <s:step> 
                            <s:number value="1"/> 
                        </s:step> 
                        <s:default> 
                            <s:number value="0"/> 
                        </s:default> 
                    </s:incrementProperty> 
                    <s:if> 
                        <s:lt> 
                            <s:toNumber> 

                                <s:local> 
                                    <s:string value="scr_Id"/> 
                                </s:local>
 
                            </s:toNumber> 
                            <s:number value="10"/> 
                        </s:lt> 
                        <s:assign> 
                            <s:question path=".SCREENID"/> 
                            <s:concat> 
                                <s:string value="0000"/> 

                                <s:local> 
                                    <s:string value="scr_Id"/> 
                                </s:local> 

                            </s:concat> 
                        </s:assign> 
                    </s:if> 
                    <s:if> 
                        <s:and> 
                            <s:lt> 
                                <s:toNumber> 
                                    <s:local> 
                                        <s:string value="scr_Id"/> 
                                    </s:local> 
                                </s:toNumber> 
                                <s:number value="100"/> 
                            </s:lt> 
                            <s:gte> 
                                <s:toNumber> 
                                    <s:local> 
                                        <s:string value="scr_Id"/> 
                                    </s:local> 
                                </s:toNumber> 
                                <s:number value="10"/> 
                            </s:gte> 
                        </s:and> 
                        <s:assign> 
                            <s:question path=".SCREENID"/> 
                            <s:concat> 
                                <s:string value="000"/> 
                                <s:local> 
                                    <s:string value="scr_Id"/> 
                                </s:local> 
                            </s:concat> 
                        </s:assign> 
                    </s:if> 
                </s:list> 
            </s:if> 
        </s:if> 
        <s:if> 
            <s:and> 
                <s:not> 
                    <s:isSet> 
                        <s:question> 
                            <s:question path="/enrollment/SCRNUM.subjid" /> 
                        </s:question> 
                    </s:isSet> 
                </s:not> 
                <s:isSet> 
                    <s:question> 
                        <s:question path="/enrollment/SCRNUM.SCREENID" /> 
                    </s:question> 
                </s:isSet> 
            </s:and> 
            <s:assign> 
                <s:question path=".subjid"/> 
                <s:stringPath path=".SCREENID:value"/> 
            </s:assign> 
        </s:if> 
    </body> 
    <target typeId="SCRNUM" when="after" shouldReconcile='false' /> 
</script> 



Need more help?

Please visit the Fountayn Contact Information page.