<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>RaptureLazarus さんのアクティビティ</title><link>https://www.aras.com/community/members/rapturelazarus</link><description>RaptureLazarus さんの最近のアクティビティ</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>How to get a property default value?</title><link>https://www.aras.com/community/f/development/36933/how-to-get-a-property-default-value</link><pubDate>Thu, 30 Sep 2021 12:04:16 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:326d650d-ec14-4389-9674-4e0c6a01d3c5</guid><dc:creator>RaptureLazarus</dc:creator><description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This feels like a silly thing to ask, but I haven&amp;#39;t seen anything in the documentation or the forum regarding getting the default value of a property.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Some context:&lt;/p&gt;
&lt;p&gt;I need to evaluate values, but if a value is not present, I need to evaluate using a default value.&lt;/p&gt;
&lt;p&gt;The problem is that, when I use getProperty, no value is provided.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can use an onPopulate event to add the default value to the property, but that defeats the purpose of having the option to do it from the ItemType itself.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Am I missing something here?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>How to define export data for Excel, Word or PDF?</title><link>https://www.aras.com/community/f/development/36842/how-to-define-export-data-for-excel-word-or-pdf</link><pubDate>Tue, 24 Aug 2021 13:05:30 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:2b4f5f87-5145-4c34-8e0f-5d953e77af5d</guid><dc:creator>RaptureLazarus</dc:creator><description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We need to export some of out Process Plans for external use, but when we export to Word, PDF or Excel, only the&amp;nbsp;name, description and process plan number are included in the document.&lt;/p&gt;
&lt;p&gt;How could we go about configuring this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Let me Help You</title><link>https://www.aras.com/community/achievements/687f4b6d-e18a-4e55-836c-49926ca2c9d9</link><pubDate>Thu, 29 Jul 2021 06:40:10 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a15e3d70-3dd7-412c-b9fd-c870f32831e8</guid><dc:creator /><description>Answer a question that is verified as helpful or correct.</description></item><item><title>What is the correct way to parse DateTime on a server side onAfterGet event?</title><link>https://www.aras.com/community/f/development/36749/what-is-the-correct-way-to-parse-datetime-on-a-server-side-onafterget-event</link><pubDate>Wed, 28 Jul 2021 08:00:58 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:39f8221f-0e97-466d-82c4-cb0108645daf</guid><dc:creator>RaptureLazarus</dc:creator><description>&lt;p&gt;Hi everyone.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m currently trying to evaluate the current date and a date property however, when I try do parse the string provided by getProperty, it gives me the error:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;String was not recognized as a valid DateTime.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can confirm the property is of the Type: Date and Pattern: Short Date.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My relevant code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;for (int i = 0; i &amp;lt; this.getItemCount(); i++)
{
    Item thisItem = this.getItemByIndex(i);
    
    string dateStr1 = thisItem.getProperty(&amp;quot;_calibrated_next&amp;quot;,&amp;quot;&amp;quot;);
    DateTime date1 = DateTime.Parse(dateStr1);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The only thing that I can think of that may cause this error is the date format conversion when localized from neutral UTC, but I couldn&amp;#39;t find much in the Aras documentation related to this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Gopikrishnan</title><link>https://www.aras.com/community/members/rapturelazarus/activities/bfca97bc-00c7-474c-ad68-5b16104b67fd</link><pubDate>Thu, 22 Jul 2021 15:11:00 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:bfca97bc-00c7-474c-ad68-5b16104b67fd</guid><dc:creator>Gopikrishnan</dc:creator><description>&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>onChange field value does not keep new value when item is saved</title><link>https://www.aras.com/community/f/development/36728/onchange-field-value-does-not-keep-new-value-when-item-is-saved</link><pubDate>Thu, 22 Jul 2021 08:01:12 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:7e6cf9ef-8a1e-4f93-a6aa-4db234d76d6f</guid><dc:creator>RaptureLazarus</dc:creator><description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have an on change event that fires when one of my stock fields are changed, which should change the value of a stock message field.&lt;/p&gt;
&lt;p&gt;The function I have is able to change the value of the stock message field, but when I save/click done, the value is not updated in the properties.&lt;/p&gt;
&lt;p&gt;My code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;var fMinStock = document.getElementsByName(&amp;quot;_minimum_stock&amp;quot;)[1].value;
var fCurrStock = document.getElementsByName(&amp;quot;_current_stock&amp;quot;)[1].value;
var iMinStock = parseInt(fMinStock);
var iCurrStock = parseInt(fCurrStock);
var fStockMessage = getFieldByName(&amp;quot;_stock_message&amp;quot;).getElementsByTagName(&amp;quot;input&amp;quot;)[0];
    
var stockMsg = &amp;quot;&amp;quot;;
var stockMsgColor = &amp;quot;&amp;quot;;
    
if(iCurrStock &amp;lt; iMinStock){
    stockMsg = &amp;quot;Insufficient Stock&amp;quot;;
}else{
    stockMsg = &amp;quot;Sufficient Stock&amp;quot;;
}
    
fStockMessage.value = stockMsg;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The onChange in action:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/pastedimage1626940460957v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;When save or done is clicked after onChange:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/pastedimage1626940594737v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any ideas on what I might be doing wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Client side Form function and script not evaluating correctly.</title><link>https://www.aras.com/community/f/development/36663/client-side-form-function-and-script-not-evaluating-correctly</link><pubDate>Wed, 07 Jul 2021 11:28:55 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9a6bbea0-0563-4cb2-a8fd-3f15b88ec882</guid><dc:creator>RaptureLazarus</dc:creator><description>&lt;p&gt;Good day all.&lt;/p&gt;
&lt;p&gt;TL;DR:&amp;nbsp;I am having trouble getting an onLoad&amp;nbsp;method to reliably print an evaluated value to a field.&lt;/p&gt;
&lt;p&gt;The form is as follows:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/Form.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Stock message contains: &lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;span id=&amp;#39;stock_msg&amp;#39;&amp;gt;&amp;lt;/span&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have a javascript onLoad method that compares the minimum and current stock:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="javascript"&gt;// Create min and current stock variables
var minStock = document.thisItem.getProperty(&amp;quot;_minimum_stock&amp;quot;);
var currStock = document.thisItem.getProperty(&amp;quot;_current_stock&amp;quot;);

// Bring in HTML field span
var field = document.getElementById(&amp;quot;stock_msg&amp;quot;);
// Create stockMsgValue variable
var stockMsgValue = null;

// if current stock is less than or equals to minimum stock
if(currStock &amp;lt;= minStock)
{
    stockMsgValue = &amp;quot;&amp;lt;p style=&amp;#39;color: red&amp;#39;&amp;gt;Not enough Stock!&amp;lt;/p&amp;gt;&amp;quot;;
} else {
    stockMsgValue = &amp;quot;&amp;lt;p style=&amp;#39;color: green&amp;#39;&amp;gt;Stock levels look good&amp;lt;/p&amp;gt;&amp;quot;;
}

// Write to HTML field span
field.innerHTML += stockMsgValue;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did something similar with Stock message 2, but included the javascript in the HTML field directly:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="html"&gt;&amp;lt;div id=&amp;quot;Message&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div id=&amp;quot;min&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div id=&amp;quot;curr&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;

&amp;lt;script&amp;gt;
var divText = document.getElementById(&amp;quot;Message&amp;quot;);
var divCurr = document.getElementById(&amp;quot;curr&amp;quot;);
var divMin = document.getElementById(&amp;quot;min&amp;quot;);
var currStock = document.thisItem.getProperty(&amp;quot;_current_stock&amp;quot;);
var minStock = document.thisItem.getProperty(&amp;quot;_minimum_stock&amp;quot;);

if(currStock &amp;lt;= minStock ) {
    var textVal = &amp;quot;&amp;lt;span style=&amp;#39;color: red&amp;#39;;&amp;gt;Insufficient&amp;lt;/span&amp;gt;&amp;quot;;
}
else {
    var textVal = &amp;quot;&amp;lt;span style=&amp;#39;color: green&amp;#39;;&amp;gt;Sufficient&amp;lt;/span&amp;gt;&amp;quot;;
}

divText.innerHTML += textVal;
divMin.innerHTML += &amp;quot;Minimum stock: &amp;quot; +minStock;
divCurr.innerHTML += &amp;quot;Current stock: &amp;quot; + currStock;

&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The problem is that it works for a little bit, and then the evaluation does not reflect the correct values.&lt;/p&gt;
&lt;p&gt;Some examples:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/pastedimage1625656785427v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/pastedimage1625657080611v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question I</title><link>https://www.aras.com/community/achievements/460ac7df-7ccc-4c42-a204-9e05eef3be09</link><pubDate>Wed, 07 Jul 2021 02:48:30 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:be941859-ebcb-4f97-9607-9be7711641c2</guid><dc:creator /><description>Ask a question in a forum.</description></item></channel></rss>