Copy Value with Trigger
See original GitHub issueIs it possible to copy the value from one question to another via a trigger? For example:
{
pages: [
{
name: "page1",
elements: [
{
type: "text",
name: "homephone",
title: "Home Phone",
isRequired: true,
inputType: "tel"
},
{
type: "boolean",
name: "sameashomebool",
defaultValue: "True",
valueTrue: "True",
valueFalse: "False"
},
{
type: "text",
name: "mobilephone",
visibleIf: "{sameashome} empty",
title: "Mobile Phone"
}
]
}
],
triggers: [
{
type: "setvalue",
operator: "equal",
value: "True",
name: "sameashomebool",
setToName: "mobilephone",
setValue: "homephone"
},
{
type: "setvalue",
operator: "equal",
value: "False",
name: "sameashomebool",
setToName: "{mobilephone}"
}
],
showQuestionNumbers: "off",
showProgressBar: "top"
}
What is the current behavior?
The above snippet copies the literal {mobilephone}
string. I was hoping to copy the value entered by the user.
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to copy values between fields using triggers
I'm currently trying to create a trigger to copy a custom text field on a ticket into a custom user field.
Read more >Mysql trigger to copy id from one column to another in same ...
So my question are: With this trigger value in both column will be always same when new record is created? Is there better...
Read more >Apex trigger to copy a value from a custom field to a standard ...
I have an idea, but am not sure how to accomplish it using an Apex trigger... ... Step #1: Enter the lead's first...
Read more >Examples of copying triggers - IBM
These examples show the DDL that is generated when you copy triggers between heterogeneous databases. The triggers are copied as part of the...
Read more >Given a FOR EACH ROW trigger that runs on INSERT, will ...
Out of curiosity, I tested it myself. It seems like COPY is materially faster than multi-value INSERT when it comes to triggers.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wollerman @akhoury I have added CopyValueTrigger. It has setToName and fromName properties.
Thank you, Andrew
@akhoury Unfortunately not, but I will increase the value of the card in the TODO list.
Thank you, Andrew