Conversion syntax (Closed)

I am attempting to write a script from a button that grabs certain values and places them in a message or input box and then reacts to the input.However I get an error that the syntax is wrong.

Here is the current code

Sub Click(Source As Button)

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument

Dim a As Integer

Dim b As Integer

Dim c As Integer

Dim num As Integer

Dim msg As String

Set uidoc = workspace.CurrentDocument

Set doc = uidoc.document

a = doc.Item_Saleprice1

b = doc.Item_Special1

c = doc.Item_Clearance1

'Print "sales price" a "Special" b "Clearance" c

msg = Str(100)

num% = Cint(Inputbox$("Enter the price"  & msg))

doc.QTY1 = num%

End Sub

This gives me a type mismatch error. I have tried various versions of STR(a) and as variant and string but all fail for syntax or mismatch error.

What I want to do is have the variable msg be a string of a, b, or c which are number fields.

However I will settle for just getting the value of A to display in the input box. The reason I am trying to do this in Script is so that I can use a refresh UIDoc to recalculate a computed field immediately.

Problem was the field was trying to return an Array.

Subject: Formula version

Here is what I want to accomplish with this script in in formula.My trouble with the formula version is that I want to have a uirefresh after the input and even with @postedcommand that does not work well using formula.

Button…

Value := Item_Saleprice1;

A := @Prompt([OkCancelEdit]; “Field Update”; “Confirm Price for this item:”; @Text(Value));

FIELD Item_Price1 := A;

@Command([EditDocument]; 1);

@Command([RefreshWindow]);

@Command([FileSave]);

@PostedCommand([EditDocument]; 1)

Computed field to display text statement based on input…

@IfError( @If(Item_Price1 <Item_Saleprice1; @If(Item_Price1 <= Item_Special1; @If(Item_Price1<= Item_Clearance1; “Too Low”; “Below Special”); “Below Sale”) ; “Accepted”) ; “” )

Ideally I can have these statements shown as a message box after entering the value so that if they go too low they have t at least click OK and may hit the button again to enter a new value.