投稿済み Thu, 04 May 2023 10:58:42 GMT 、投稿者 Jalila Manal
Hello,<br> <br> I would like to configure a loop in a workflow.<br> For that reason, I've created a keyword variable named List_NewClient, this variable should get the value of the field NewClient1, NewClient2, ..NewClient4. in each iteration.<br> The issue is: in this field only two values are possible: yes or no.<br> While testing, I noticed that the keyworld variable will restetute only different values, which means that if I should have this result on the list:<br> Yes<br> No<br> No<br> Yes<br> My variable List_NewClient will get Yes, No<br> And this is not good for the logic of my WF, what I need to have is List_NewClient: Yes, No, No, Yes.<br> <br> Do you have any idea how I can get this result?<br> <br> PS: I've unchecked the box &quot;replace&quot; on the WF.<br> <br> Thank you in advance.<br> Regards,<br> &#160;
投稿済み Thu, 04 May 2023 11:55:25 GMT 、投稿者 Simon H. Hellmann Toshiba Tec Germany Imaging Systems GmbH IT-Consultant Document Management Solutions
Hi Jalila,&#160;<br> <br> you could try to work with checking the box &quot;replace&quot; and use an arithmetic expression like the following:<br> <code>Split(KeywordAsString(GV_List__NewClient,&quot;;&quot;) &amp; &quot;;&quot; &amp; DW_NEWCLIENTn,&quot;;&quot;)</code><br> <br> This will first take the values from your list and put it into a string separated with &quot;;&quot;, then add the new value to the end and split it again into a keyword field.<br> Example: <pre class="linenums prettyprint">// Starting values: Yes No // next value to add: No // result after: <code>KeywordAsString(GV_List__NewClient,&quot;;&quot;) </code>Yes;No // result after: <code>KeywordAsString(GV_List__NewClient,&quot;;&quot;)</code> <code>&amp; &quot;;&quot; &amp; DW_NEWCLIENT3 Yes;No;No </code>// result after: <code>Split(KeywordAsString(GV_List__NewClient,&quot;;&quot;) &amp; &quot;;&quot; &amp; DW_NEWCLIENT3,&quot;;&quot;) Yes No No</code> </pre> <br> Hope this helps.<br> ​​​​​​​<br> Greetings from Germany,<br> Simon H. Hellmann<br> DocuWare System Consultant
投稿済み Mon, 08 May 2023 14:37:41 GMT 、投稿者 Jalila Manal
Hello Simon,<br> <br> Many thanks for your reply.<br> If I understood you right, the final result will in a string variable.<br> If this is the case, It wont help me as I could not use the keyworld variable to loop.<br> <br> I just give you this example to simplify the problem, but what I'm trying to do is the following:<br> <br> 1. A user will fill a web form like the following: <table border=1 cellpadding=1 cellspacing=1 style="width:500px;"> <tbody> <tr> <td>Client NAme</td> <td>New client</td> <td>Amount</td> </tr> <tr> <td>client1</td> <td>yes</td> <td></td> </tr> <tr> <td>Client2</td> <td>yes</td> <td></td> </tr> <tr> <td>Client3</td> <td>no</td> <td></td> </tr> </tbody> </table> <br> My WF should be able to calculate the amount and put it on the corresponding fill area, depending on the New client column value.<br> Let's say, if New client=yes, then amont= 5000, else, amount =0<br> I can have up to 7 clients, so I would like to implement a loop with a counter.<br> What I've done, is creating a keyworld variable to read the new client column data from the index entries like the following:<br> GV_List__NewClient &lt;--- NewClient1 (index entry)&#160;<br> GV_List__NewClient &lt;--- NewClient2 (index entry)&#160;<br> ....<br> GV_List__NewClient &lt;--- NewClient7 (index entry)&#160;<br> <br> Then having a string variable ST_NewClient &lt;---&#160;GV_List__NewClient[GV_counter -1] (Arithmetic expression)<br> Then put the condition on&#160; ST_NewClient<br> If&#160;ST_NewClient=&quot;Yes&quot; GV_List_Amount[GV_counter -1]=5000 (it should be also a keworld variable)<br> if not GV_List_Amount[GV_counter -1]=0<br> <br> And then update the counter.<br> <br> Over to you.<br> Regards,
投稿済み Fri, 12 May 2023 15:20:07 GMT 、投稿者 Tobias Getz DocuWare GmbH Team Leader Product Management
Hi Jalila Manal,<br> <br> a keyword field can always have single values, it is not like an ordered lists. If you want individual entries for lines, than you could think about solving this with a table as index fields. This way you can even calculate inside the table and maybe then you even maybe can prevent to add a loop. So the &quot;Amount&quot; column would be filled by a calculation if the column &quot;New Client&quot; is &quot;Yes&quot;.<br> <br> But this advice is very general without actually knowing the specific use case.<br> <br> Regards<br> Tobias Getz<br> Team Leader Product Management<br> DocuWare GmbH

フォーラムに投稿するためにはログインが必要です。