Mapping a user input with the collection value as a range

173 views
Skip to first unread message

banerjee...@gmail.com

unread,
May 9, 2015, 9:59:23 AM5/9/15
to suppor...@runmyprocess.com
Hi Team,

In my web interface there is a text box which takes only number as its input, now the condition is when the input is given, for example 52k and then i want this value should be matched with the collection column called amount, but the issue is, this amount column consist of range of values,i.e not a single value...for example the column in the collection consist of the values like 0k-55k, and beside this column there is an app-rover name list.

i.e for if the proposed amount is between 0k-55k then it's following approver will approve the ticket...

Can you please tell me what can i do to achieve this, or is there are any other way out to achieve it?

Muralikrishna Kummaragunta

unread,
May 10, 2015, 4:34:18 AM5/10/15
to suppor...@runmyprocess.com
Hi Somjit,

As you mentioned that the text box is of number type and hence input of 52k is invalid, seems contradictory.
The best way could be give complete number like 52000.

Similarly, define collection values with an upper limit say(10000,20000 etc.) and can compare with input number and fetch the Approver name.

Alternately, you can define the amount range, approver in custom list and use them in your web interface if at all the Amount range, Approver are consistent. See Attached.

Custom List :Amount Range - Approver

Include js widget that listens to Amount Range and Populate the Approver.

//Javascript
id_approver.setValue(id_claim_amount.getSelectedValue());

Regards,
Murali


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" 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/17b4a471-e668-4acd-9777-fcaa29309ecf%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.



Use Custom List to choose Approver for Amount.png

Somjit Banerjee

unread,
May 10, 2015, 9:40:46 PM5/10/15
to suppor...@runmyprocess.com
Hi Murali,

For the first scenario as you said to compare the values with the collection,from the text input can please explain it to me briefly...

Regards

You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/iuTSiSEfV2k/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/.

Somjit Banerjee

unread,
May 11, 2015, 12:23:11 AM5/11/15
to suppor...@runmyprocess.com
Hi Murali,

Adding to my previous mail,there are multiple approvers for a range for example 10000, now the issue is suppose user input 9000 only in the amount, then how to match and compare with the collection value,

I was trying something with the auto complete feature but at a time only one approver for that is being fetched. can you tell me how to achieve what i am asking for ?

Regards

Murali

unread,
May 11, 2015, 1:36:44 AM5/11/15
to suppor...@runmyprocess.com, banerjee...@gmail.com, banerjee...@gmail.com
Hi Somjit,

Please give us the sample of collection values and confirm whether you are using Number as input type.

Regards,
Murali


On Monday, May 11, 2015 at 9:53:11 AM UTC+5:30, Somjit Banerjee wrote:
Hi Murali,

Adding to my previous mail,there are multiple approvers for a range for example 10000, now the issue is suppose user input 9000 only in the amount, then how to match and compare with the collection value,

I was trying something with the auto complete feature but at a time only one approver for that is being fetched. can you tell me how to achieve what i am asking for ?

Regards
On Mon, May 11, 2015 at 9:40 AM, Somjit Banerjee <banerjee...@gmail.com> wrote:
Hi Murali,

For the first scenario as you said to compare the values with the collection,from the text input can please explain it to me briefly...

Regards
On Sun, May 10, 2015 at 4:34 PM, Muralikrishna Kummaragunta <mkummaragunta@runmyprocess.com> wrote:
Hi Somjit,

As you mentioned that the text box is of number type and hence input of 52k is invalid, seems contradictory.
The best way could be give complete number like 52000.

Similarly, define collection values with an upper limit say(10000,20000 etc.) and can compare with input number and fetch the Approver name.

Alternately, you can define the amount range, approver in custom list and use them in your web interface if at all the Amount range, Approver are consistent. See Attached.

Custom List :Amount Range - Approver

Include js widget that listens to Amount Range and Populate the Approver.

//Javascript
id_approver.setValue(id_claim_amount.getSelectedValue());

Regards,
Murali
On Sat, May 9, 2015 at 7:29 PM, <banerjee...@gmail.com> wrote:
Hi Team,

In my web interface there is a text box which takes only number as its input, now the condition is when the input is given, for example 52k and then i want this value should be matched with the collection column called amount, but the issue is, this amount column consist of range of values,i.e not a single value...for example the column in the collection consist of the values like 0k-55k, and beside this column there is an app-rover name list.

i.e for if the proposed amount is between 0k-55k then it's following approver will approve the ticket...

Can you please tell me what can i do to achieve this, or is there are any other way out to achieve it?

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/iuTSiSEfV2k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum+unsubscribe@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/.

Somjit Banerjee

unread,
May 11, 2015, 1:44:37 AM5/11/15
to suppor...@runmyprocess.com, Muralikrishna Kummaragunta
Hi Murali ,

Please find the attached file and let me know. I am using number as input type.


Regards,

On Mon, May 11, 2015 at 1:36 PM, Murali <mkumma...@runmyprocess.com> wrote:
Hi Somjit,

Please give us the sample of collection values and confirm whether you are using Number as input type.

Regards,
Murali


On Monday, May 11, 2015 at 9:53:11 AM UTC+5:30, Somjit Banerjee wrote:
Hi Murali,

Adding to my previous mail,there are multiple approvers for a range for example 10000, now the issue is suppose user input 9000 only in the amount, then how to match and compare with the collection value,

I was trying something with the auto complete feature but at a time only one approver for that is being fetched. can you tell me how to achieve what i am asking for ?

Regards
On Mon, May 11, 2015 at 9:40 AM, Somjit Banerjee <banerjee...@gmail.com> wrote:
Hi Murali,

For the first scenario as you said to compare the values with the collection,from the text input can please explain it to me briefly...

Regards
On Sun, May 10, 2015 at 4:34 PM, Muralikrishna Kummaragunta <mkumma...@runmyprocess.com> wrote:
Hi Somjit,

As you mentioned that the text box is of number type and hence input of 52k is invalid, seems contradictory.
The best way could be give complete number like 52000.

Similarly, define collection values with an upper limit say(10000,20000 etc.) and can compare with input number and fetch the Approver name.

Alternately, you can define the amount range, approver in custom list and use them in your web interface if at all the Amount range, Approver are consistent. See Attached.

Custom List :Amount Range - Approver

Include js widget that listens to Amount Range and Populate the Approver.

//Javascript
id_approver.setValue(id_claim_amount.getSelectedValue());

Regards,
Murali
On Sat, May 9, 2015 at 7:29 PM, <banerjee...@gmail.com> wrote:
Hi Team,

In my web interface there is a text box which takes only number as its input, now the condition is when the input is given, for example 52k and then i want this value should be matched with the collection column called amount, but the issue is, this amount column consist of range of values,i.e not a single value...for example the column in the collection consist of the values like 0k-55k, and beside this column there is an app-rover name list.

i.e for if the proposed amount is between 0k-55k then it's following approver will approve the ticket...

Can you please tell me what can i do to achieve this, or is there are any other way out to achieve it?

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/iuTSiSEfV2k/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/.
approvalmatrix.csv

Somjit Banerjee

unread,
May 12, 2015, 5:24:19 AM5/12/15
to suppor...@runmyprocess.com, Muralikrishna Kummaragunta
Hi Team,

Did you find any solution regarding to my querry?

Regards,

Sweta Suman

unread,
May 12, 2015, 5:55:35 AM5/12/15
to suppor...@runmyprocess.com
Hi Somjit,

To get approver list corresponding to range you need to use comparison operators.

List call back all values from collection and compared with entered amount. If the condition is satisfied approver list will be populated else you can show pop-up message  to enter valid input. 

Make sure data(i.e amount column of collection) is numeric type to perform operation. Also, list should be of "variable based" type.

Please find attached JavaScript code to list call back and populated the list.

Hope this helps you.






--
Thanks,
Sweta 
Fujitsu RunMyProcess Support
js_script.txt

Somjit Banerjee

unread,
May 12, 2015, 11:27:56 PM5/12/15
to suppor...@runmyprocess.com
Hi Sweta,

The code is running fine, but the issue is its fetching all the users from the approver list, if you see the sample data then you will find there are 3 persons for the range 0-50000, so when the input is given between this range, then only 3 approvers should be fetched up in the list.

I went through the script, and according to me there should be some pattern matching for what i am asking, now i tried to implement the pattern matching with the script, but some how it's not working.

Could you please tell me what to do in this scenario?

Regards,

Pankaj Kumar

unread,
May 13, 2015, 5:35:24 AM5/13/15
to suppor...@runmyprocess.com, Somjit Banerjee
Hi Somjit,

For getting the filtered result, you can create the CAPI,and triggered it the same way as you are doing for the java script, passed the input number as the input in the CAPI.

In the CAPI, please use the below code to filter the collection:

${list_objects({"credit_amount_to":{"$gt": "$input"}},"collection_name")}

Here:- input is the inout value as integer.
ie.
${list_objects({"credit_amount_to":{"$gt": 60000}},"pan_collection")}

this return an array.

also as your collection have 

LCSB,FULL BANK,RETAIL,1,0,50000,tanmoy.ch...@sharobitech.com,NLIR3EHXMSWVMKKJHWW4AK2BFN78VR9U
LCSB,FULL BANK,RETAIL,1,0,150000,somjit....@sharobitech.com,OEAMT8CEQVWHOL51H93EKXE5UN8XTRM5

for the input of 40000, it will give the all the approval. you can modify the query as per your business logic.

Thanks,
Pankaj Kumar




Somjit Banerjee

unread,
May 13, 2015, 5:49:04 AM5/13/15
to Pankaj Kumar, suppor...@runmyprocess.com
Hi Pankaj,

I just want to know that, in the query i don't want to fix the number, i want it should determine from the collection itself when the input is given and matched with the range from the minimum and maximum amount,

would this query will help me achieve what i am asking? or there is some other way to do so?

Regards,

Pankaj Kumar

unread,
May 13, 2015, 6:12:35 AM5/13/15
to Somjit Banerjee, suppor...@runmyprocess.com
Hi Somjit,

the query:-
${list_objects({"credit_amount_to":{"$gt": "$input"}},"collection_name")}

here I have implemented only 1 condition to give you the reference for issue, you need to modify it to add the condition for the "credit_ammount_from", also in your collection the value of "credit_ammount_from" is 0. so as of now filter on "credit_ammount_from" it willl not work since in all record it has the same value 0.

You can refer the below link for reference:-



Somjit Banerjee

unread,
May 13, 2015, 6:31:21 AM5/13/15
to Pankaj Kumar, suppor...@runmyprocess.com
Hi Pankaj,

Thanks for the response i will get you back on this if i face any trouble.

Regards,
Reply all
Reply to author
Forward
0 new messages