Jump to content

Mathematics within Service Manager


Josh Bridgens

Recommended Posts

Hi Guys,

strange one - Is there any way to add the sum of different custom fields?

I have been asked to rewrite our purchasing process within SM, I wondered if there was a way to take custom field Numerical data and total the sum of a few?

Any ideas would be appreciated. :)

 

Josh

Link to comment
Share on other sites

Hi @Josh Bridgens

Yes this is possible and it is something that we have done quite successfully, below is an example of what we have done, which takes information submitted in a PCF and performs a calculation and then you can output to where you want, we output into the timeline so that it is searchable:

Total Line Cost (inc VAT) - £&[([functions.pcf("Order2","field_6")]*[functions.pcf("Order2","field_4")]*1.20).toFixed(2)]

Other things can be achieved as this is based on javascript.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

@Jeremy

Fantastic!!!!! I wasn't sure how I was going to do this one.

Just so I'm correct in my head....

That all seems fairly standard however I'm unsure regarding the "Order 2" what does this determine?

 Thank you so much for the help!!!!!!

 

- one more, would I be able to publish this on the PCF......??

 

so users can see the total cost BEFORE the call is logged?

 

Josh

Link to comment
Share on other sites

Quote

 the "Order 2" 

This relates to the question in the PCF that it is pulling from to perform the calculation. I don't believe that you can do this as part of the PCF. I cannot find anywhere you can choose/reference fields within a PCF so this would have to performed as one of the first parts of the BPM.

At least this is how we have done this.

 

Link to comment
Share on other sites

4 minutes ago, Victor said:

The above advice applies to business process workflows, not progressive captures flows...

Thought so, but we can all dream cant we?!

7 minutes ago, Jeremy said:

This relates to the question in the PCF that it is pulling from to perform the calculation

Brilliant... One more question, sorry!

In the "value/Display" field within the PCF, If I was to put the value as 30 and the Display as "Wireless keyboard" - would that then pick up the £30 within the equation?

 

Apologies for the million questions.

 

Josh

Link to comment
Share on other sites

@Josh Bridgens when using &[([functions.pcf("...")] variables, they should pick up values, not the display (it actually picks up the answer which should be the value)... so yes, it should pick up the 30 you have configured there... do a test, let us know how it works (I haven't tried this personally so cannot say for sure... there is a chance I am wrong and the answer stored the display, not the value...)

Link to comment
Share on other sites

1 hour ago, Josh Bridgens said:

This relates to the question in the PCF that it is pulling from to perform the calculation

OK, Ive tried a few times replacing yours with what I believe mine would be for a test and I'm not doing so well.

Total Line Cost (ex VAT) - £&[([functions.pcf("frm_individualassets","fld_laptop1")]+[functions.pcf("frm_individualassets","fld_printer1")]*1.00).toFixed(2)]

Am I getting this all wrong? 

this is getting quite embarrassing now.... :unsure:

 

Josh

Link to comment
Share on other sites

@Josh Bridgens well... you see, Hornbill is a very intelligent system... true, you did set up the 50000 as one price and other values... but Hornbill sees through all this and tell you that the items there...they not worth more than 6 quid... ;) :P:D 

 

Jokes aside, try this:

£&[([functions.pcf("frm_individualassets","fld_laptop1")]*1.00+[functions.pcf("frm_individualassets","fld_printer1")]*1.00).toFixed(2)]

Link to comment
Share on other sites

@Josh Bridgens : new update: "Workflow - BPM Editor: decision node custom expressions now use popup editor" and "Workflow - BPM Editor: change decision node custom expressions to use popup editor so can do more complicated expression by adding brackets"

 

Your decision nodes should not be affected... @NeilWJ any thoughts regarding the PCF variables? 

Link to comment
Share on other sites

6 minutes ago, Victor said:

Your decision nodes should not be affected... @NeilWJ any thoughts regarding the PCF variables? 

Got it now.... today is not my day, formatting was slightly off for the PCF Variables.

 

30 minutes til home time...

29 minutes til home time...

28 and a half minutes til home time...

Link to comment
Share on other sites

2 minutes ago, Victor said:

Wait... wait... do you mean... you're allowed to go home ??? :o

Still haven't left the office..... had to pick up the phones!!!!!!

I'm half sorted, I'm still a bit, how do i put it, bewildered regarding this display/value dilemma and the way it currently works, It doesn't make much sense to me having it this way.

There are certain ways I need to do this so that it maps properly to an agreed "form" for finance to sign off on, and without it displaying the correct names of items, I'm not going to have much luck :(

I will eventually leave this god forsaken place...

Image result for horrible office

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...