Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

User Response

Avatar

Former Community Member
I have an accident form 98% complete and have the need for the user to input the accident report # using a response dialog.

the code I have is:

var response

response=xfa.host.response("Enter the Accident Number", "IAR")

if (response!=null)

(response=text1.value)



I get the dialog box and can enter the data but it doesn't go anywhere.

Frustrated Again!

Thanks ahead of time.
2 Replies

Avatar

Level 7
You can have gotten or set the response value, now put it some place:



var sResponse

sResponse=xfa.host.response("Enter the Accident Number", "IAR")

if (sResponse!=null) then

(sResponse = text1.rawValue)

endif

$.rawValue = response

xfa.host.messageBox(Concat("Entered IAR is: ",

sResponse), "Debugging", 3);

$.rawValue = sResponse



// or use the response method to autofill the default text



// get: "Accident Number", title: "IAR", default text: text1.formattedValue

var sResponse = xfa.host.response("Enter the Accident Number", "IAR", text1.formattedValue);

xfa.host.messageBox(Concat("Entered IAR is: ",

sResponse), "Debugging", 3);

$.rawValue = sResponse