Practice - Book Sales Report

Hello,

I am unable to get the multiplication formula to calculate the final price and I have also follow the as per solution given (ListPrice*PracticedPrice)

Please advise and explained how to resolve this issue.

Thank you!

image

Hi @kimberly.lin

listPrice As Double = CDbl(“ListPrice”).ToString()
practicedPrice As Double = CDbl(“PracticedPrice”).ToString()
finalPrice As Double = listPrice * practicedPrice

or

Assign-> Final Price=CDbl(“ListPrice”)*CDbl(“PracticedPrice”)

I hope you understand!!

Hello,

I tried adding CDbl(“ListPrice”)*CDbl(“PracticedPrice”) but the final price is still without doing the multiplication.

Please advise what should I add in write cell to ensure that the final price is able to do multiplication instead.

Thank you!

image

Try multiplying it seperately using an assign activity using a variable and then use the variable in write cell activity

Regards,

Hi @kimberly.lin

Try referring the below workflow. It will help you solve your query.

Main.xaml (25.7 KB)

Regards,

@kimberly.lin

Take an assign activity
Assign-> Final Price=CDbl(“ListPrice”)*CDbl(“PracticedPrice”)
The variable type of Final price is double and check it in message box

Hello all,

I am using Studio X and did not see assign activity.

Is there any advance editor to include the formular instead?

@kimberly.lin

Use Set Variable activity

Hello,

I use set variable and tried different ways but unable to get it to run.

Please advise.

image

@kimberly.lin

The Variables must be datatype Double

@kimberly.lin
Try this. Change your excel file path to your path location.

Regards

Hi @kimberly.lin

Please find the below xaml.

Main.xaml (16.2 KB)

O/P:

Regards,

Hi all,

I have retried the workflow with only the BookInventory excel file but it didn’t seem to be running as it should.

Please advise

image

Main.xaml (15.3 KB)

Hi @kimberly.lin

Try this For Final price:
string.Format(“{0} * {1}”,Cint( NewListPrice), Cint(PracticedPrice))

Hello,

After amending it, there is an error

@kimberly.lin

Re-enter the “”(double quotes)

Have Re-enter the “”(double quotes) and re-type string.Format(“{0} * {1}”,Cint( NewListPrice), Cint(PracticedPrice)) but still unable to run

@kimberly.lin

string.Format(“{0} * {1}”,Cint( NewListPrice), Cint(PracticedPrice)).ToString

Did it throwing any error?

Have the same error as the first run

@kimberly.lin

I think the excel data has double values, so try this:
string.Format(“{0} * {1}”,CDbl( NewListPrice), CDbl(PracticedPrice)).ToString