Zum Hauptinhalt gehen

I am trying to create a value based on multiple selected values from a drop down list. Seems relatively straightforward, but I can't seem to get the syntax right on my 'Create Value' features.

Kommentare

4 Kommentare

  • Stefan Schweigert

    Hi Andrew,

     

    You are syntactically correctly selecting the value attribute from the Drop Down List in the Create Value activity. In the Drop Down List items themselves, are you assigning a numeric value to each possible selection?

     

    Thanks, Stefan

    0
  • Permanently deleted user

    I am assigning the numeric values to the drop down items (assuming this is what you mean):

    help3

    Here is what the alert shows me in the sandbox, 'NaN' being where I would expect the calculated value to be:

    help4

     

    0
  • Stefan Schweigert

    Hi Andrew,

     

    Yes, that's what I was looking for. I think you may need brackets around the division statement. Create Value accepts the any type any tries to infer based on the input as to what type it should be, so using brackets ensures that the value will be a number. The NaN error suggests that the Alert is trying to display the variable as a number, but the type may not be properly set.

     

    Thanks, Stefan

    0
  • Permanently deleted user

    Thank you Stefan, that was what I needed to fix.

    For anyone looking at this in the future, here is what my mathematical statement ended up looking like:

    help5

    where LoadAt010 is a 'number' element, and LLength & pipeSize are 'drop down list' elements.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.