Auto generate an number with criteria and save to google spreadsheet and after saving to spreadsheet show that auto generated number as an alert after submiting the form

797 views
Skip to first unread message

ii2team...@gmail.com

unread,
Oct 30, 2014, 1:19:07 AM10/30/14
to suppor...@runmyprocess.com
Hi,

I'm creating a interface for enrollment form and using a Google spreadsheet to store details(name,branch(list of states eg:karnarata, and value of list item KA),date, contact number etc.and submit button to do the action).

In that i want to generate a auto number while storing to database in format (enrollment number should be alphanumeric and should contain a prefix based on the branch (e.g. KA, KL, TN) and year (e.g. 14), month (e.g. 08) and an auto increment no for the month (should reset to 0001 for the next month and other for different branch))
And want to show the generated number as an alert after submitting the form,each time it should check the branch and auto incremented number(0001,0002 etc) and create the enrollment form

Hope i will get a answer.

Thanks

Shobhit Tripathi

unread,
Oct 30, 2014, 4:54:20 AM10/30/14
to suppor...@runmyprocess.com
Hi,

For generating Unique number(which should contain Alphanumeric) as per your requirement you have to use "next_value" freemarker function in your process. To do so please follow below steps:

1. Go to --> process (Start event/ activity) --> Output variable and write below code

                      <#assign month = "${now('MM')}">
                        ${month}
This will return current month.

Note: Name -->month and value --> (put above code)

2. Add another variable Give some name and use below code 

                     KA${month}14${next_value("${month}")?number?string("0000")} 

Here KA is prefix (you can use your branch value (that is if it is dynamic then you have to use ${var_name}))
${month} --> taking as dynamic( through step 1).
14 --> year

If you are still having any doubt, please feel free to ask. 

Thanks & Regards,
Shobhit




--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/39a4faef-ea91-40ac-8263-a6abb5e77ab9%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.



--
Thanks & Regards,
Shobhit
Fujitsu- RunMyProcess

Arunkumar P

unread,
Oct 30, 2014, 5:21:19 AM10/30/14
to suppor...@runmyprocess.com
Hi,

Thank you for your concern, I'm tryng that code, i have one doubt which the second step in your reply also i have to giv in strat activity or not? and for inserting that to spreadsheet what i have to do?

Thank you.

You received this message because you are subscribed to a topic in the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/OAAUek1CfGs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

Shobhit Tripathi

unread,
Oct 30, 2014, 7:00:20 AM10/30/14
to suppor...@runmyprocess.com
Hi,

No need to use multiple times. Either you can use at start event or other activity (before inserting all data into spreadsheet).
After this you have to pass this variable into your spreadsheet.

For storing all data into the spreadsheet use "Add a Row[v3]" connector or else you can explore more connectors from the RMP Library (Google Spreadsheet provider name).

If you still having any issue please feel free to ask.

Thanks & Regards,
Shobhit

Arunkumar P

unread,
Oct 30, 2014, 7:13:58 AM10/30/14
to suppor...@runmyprocess.com
Hi,

Thank you , i got and is success. i have one more requirement, which is After form submission using a button, I set as "show pop-up message" , i want to customize that  which is 1)i want to show that in center of the screen 2)or else i want to pause that message for little seconds.

Hope i will get a reply.

Thank you.

Shobhit Tripathi

unread,
Oct 30, 2014, 9:19:53 AM10/30/14
to suppor...@runmyprocess.com
Hi,

This is Pre-defined functionality. So, if you want to show pop-up message, you can use Javascript/JQuery (inside Pre-launch script in your button). Please find screenshot for more information.

Feel free to ask for further information.

Thanks & Regards,
Shobhit

pop-up_msg.png

Arunkumar P

unread,
Oct 30, 2014, 9:24:15 AM10/30/14
to suppor...@runmyprocess.com
Hi,

Can you please provide the JS code to show a message with yes no option to go to next process.

Thank you.

Shobhit Tripathi

unread,
Oct 30, 2014, 10:13:48 PM10/30/14
to suppor...@runmyprocess.com
Hi,

You can refer below JS code to show yes and no option.

                           window.confirm("Message to be display");

If you want to perform any action on clicking of yes/no then refer below code:
                                      
var action;
var yes = confirm("Proceed to next");
   if (yes == true) 
{
  action= "write your code here";
    } 
   else
{
  action    = "Request Canceled!";
    }

Thanks & Regards,
Shobhit

Reply all
Reply to author
Forward
0 new messages