[solved] Service dialog use multiple dynamic text box will overwrite each other


#1

Hi all,
I create a dialog will get request user and the text box will show the first name, last name, and email in each box.
I am sure the dynamic Entry Point is currect, but the text box will overwrite each other text box show the wrong result.

There are the automate scripts

  • first_name
#
# Description: Show the request user first name
#
user_id = $evm.root.attributes['user_id']
user = $evm.vmdb('user').find_by_id(user_id)
$evm.object['value'] = user.first_name ? user.first_name : 'Cloud'
$evm.log('info', "First name: #{$evm.object['value']}")
$evm.log('info', "Build owner_first_name Complete")
  • last name
#
# Description: Show the request user last name
#
user_id = $evm.root.attributes['user_id']
user = $evm.vmdb('user').find_by_id(user_id)
$evm.object['value'] = user.last_name ? user.last_name : 'Admin'
$evm.log('info', "Last name: #{$evm.object['value']}")
$evm.log('info', "Build owner_last_name Complete")

email

#
# Description: Show the request user email
#
user_id = $evm.root.attributes['user_id']
user = $evm.vmdb('user').find_by_id(user_id)
$evm.object['value'] = user.email
$evm.log('info', "Last name: #{$evm.object['value']}")
$evm.log('info', "Build owner_email Complete")

#2

I found the reason.
My instance execute the wrong instance