Solved Student grade exercise: Data from excel is of text type while in choice I need to compare it to number type.

growler

Member
Hi everyone,

I am fairly new to Blue prism. I want to grade students based on their percentages, I am pulling the data from excel storing it in a collection and passing the collection's percentage field as input to the choice criterion, wherein I would compare the percentage with the range of numbers and write the grades accordingly back to the excel file in a separate column. I have not defined the structure of the collection simply for the fact that there may be hundreds if columns in an excel sheet and it won't be practical to define fields in that case, so blue prism will itself create the structure based on the excel sheet. I am using work queues.

The problem is, my collection.percentage field is getting the data as text type but I need it to be as a number type so that I can compare it in the choice stage, I have tried to change the percentage column in excel as number but to no avail, the data still remains text type. How could I go about it?

Thank you.
 

Attachments

  • choice collection.png
    choice collection.png
    78.8 KB · Views: 120
  • choice criterias.png
    choice criterias.png
    84.8 KB · Views: 114
  • get next item.png
    get next item.png
    86.7 KB · Views: 111
  • queue collection.png
    queue collection.png
    82.7 KB · Views: 97

VJR

Well-Known Member
Hi growler,

Can you check if inside the choice criterion (choice stage properties) you are able to use the ToNumber function. Syntax would be something like ToNumber([queue.percentage])>= 90 AND ToNumber([queue.percentage])<=100 for each of the criteria. It will be available under Conversions in the list of functions. Do post back with what you find.
 

Vimal25

Member
Hi Growler ,

Please find attched process file and screen shot for your refrences .

Note- Workqueue on which senario where you have bunch of records and for small collection you can also use loop stage .

Please let me know in case you would have any concerns.

#Vimal K
 

Attachments

  • Choice Stages.png
    Choice Stages.png
    102.5 KB · Views: 121
  • Data with upgraded Grade.png
    Data with upgraded Grade.png
    103.7 KB · Views: 105

growler

Member
T
Hi growler,

Can you check if inside the choice criterion (choice stage properties) you are able to use the ToNumber function. Syntax would be something like ToNumber([queue.percentage])>= 90 AND ToNumber([queue.percentage])<=100 for each of the criteria. It will be available under Conversions in the list of functions. Do post back with what you find.

Thankyou, this solves the problem.
 

growler

Member
Hi Growler ,

Please find attched process file and screen shot for your refrences .

Note- Workqueue on which senario where you have bunch of records and for small collection you can also use loop stage .

Please let me know in case you would have any concerns.

#Vimal K
Thank you for answering, I can now compare them.
 
Top