-
RE: Error updating values in a dataset that uses ".CurrentRow" in loop
As per documentation, I am not really sure you can update the value of a column in a dataset, I believe the following action are the only ones you can perform:
insert row, move row, delete row, insert column, rename column, move column and delete column
You can always iteratively build a new dataset based on the mutation you are trying to make on your current dataset. -
RE: "Variable <myVar> not found" - error looping Dataset in called function
Hi Gabriele,
based on your code, it appears that your dataset <ds_test> is not declared inside your function.
in order to fix, you need to change the way you create your function and the way you are calling it. Make sure your function receives "ds_test" as a parameter, and pass it when you call. -
RE: Split PDF Based off of separator pages
Hi Chris,Since you already have the pages numbers into a dataset, you can loop through it and use the
Lets say you have a PDF with 3 pages and you would like to save it into 3 different PDFs, all you have to do is a loop that performance the following:PDF remove page function
,
1 - remove all the pages that are different than 1 and save it as 1.pdf,
2 - then remove all the page different than 2 and save it as 2.pdf
3 - then remove all the page different than 3 and save it as 3.pdf
Sample code (without the loop)<AMPDF ACTIVITY="delete" SOURCE="%var_source_pdf_file%" SAVETYPE="save_as" DESTINATION="%var_desired_pdf_file%" PAGE="%var_page_to_remove%" />
Hope it Helps
-
RE: Split Function
It is better to mark the thread as solved, so we can easily help other developers -
RE: Split Function
You can just loop through a list that holds the value of your variable called variable_2. the bellow code should answer your question
Also create another variable to use as placeholder
<AMVARIABLE NAME="variable_1" VALUE="A,B,C,D" />
<AMVARIABLE NAME="variable_2" VALUE="" />
<AMVARIABLE NAME="my_value" />
<AMTEXT ACTIVITY="replace" TEXT="%variable_1%" FIND="," REPLACE="
" RESULTVARIABLE="variable_2" />
<AMLOOP ACTIVITY="list" LIST="%variable_2%" DELIMITER="new_line" RESULTVARIABLE="my_value" />
<AMSHOWDIALOG>%my_value%</AMSHOWDIALOG>
<AMLOOP ACTIVITY="end" />
Do let me know if you need more help. -
RE: Split Function
Hi Phil
you can just replace the commas with a new line, The below code should output the text you want
<AMVARIABLE NAME="variable_1" VALUE="A,B,C,D" />
<AMVARIABLE NAME="variable_2" />
<AMTEXT ACTIVITY="replace" TEXT="%variable_1%" FIND="," REPLACE="
" RESULTVARIABLE="variable_2" />
<AMSHOWDIALOG>%variable_2%</AMSHOWDIALOG>
-
RE: Eval Function Returning Type Mismatch
Hi Brain, it would be better if you could share the code here -
RE: Logic comparison AND OR question
-
RE: Schedule Name to Variable
When a trigger fires, Automate creates a dataset called AMTrigger. The AMTrigger dataset has a field called Trigger which basically holds the name of the event that triggered the execution.
Each event or condition contains a unique name as shown below
AMTrigger.Trigger
Event Name
Event Log
AMEVENTLOGTRIGGER
File System
AMFILETRIGGER
Idle
AMIDLETRIGGER
Key
AMKEYTRIGGER
Performance
AMPERFORMANCETRIGGER
Process
AMPROCESSTRIGGER
Schedule
AMSCHEDULETRIGGER
Service
AMSERVICETRIGGER
SNMP Trap
AMSNMPTRIGGER
Startup
AMSTARTUPTRIGGER
Window
AMWINDOWTRIGGER
WMI
AMWMITRIGGER
by outputing %AMTrigger.Trigger% you should be able to get the info you are looking for
-
RE: Extract days betwen to dates
Hi Carlos you can use DateDiff function
E.g: %DateDiff('d', '30/07/2023', '1/08/2023')% #The output should be 2.
*The first parameter indicates which kind of interval to subtract. (d for day, h for hour and so on)