Hello,
Say I have a form with 3 fields on it, among others - Field A, Field B, and Field C. Field B and Field C are displayed on the form and filled by a lookup rule when certain things are true; only 1 of them will ever be shown on the form at a given time. They could both be hidden and empty, too.
I'd like to fill Field A with the value of Field B OR Field C if either of them has a value. If Field B and C are both empty, I want the user to manually type something into Field A. Is that something that can be done out of the box with Forms 11 in the modern designer?
Thanks!
Question
Question
Forms - IF formulas - copy value of one field to another if field isn't empty
Replies
What I would do is just enter the variables for both Fields B and C in the Default Value box for Field A. Then, mark Field A as required, so if it is empty the user needs to enter in their own value.
Let me know if that doesn't make any sense and I'll try to rephrase!
Hi Sarah,
I didn't even think of that. However, Field B and Field C don't even show up as options in the Default Value token picker thing. I'm not sure what determines whether a field would be available in that list? It's missing quite a few fields - more than just Field B and Field C.
It would involve creating a secondary step, it likely isn't letting you select variables that are only present on the current form, as it wants to pull the default value from a previous step in the process.
You could make a copy of your form & add a step in the process to fill in Field A (and whichever other fields require attention), if that works for you?
You could also try using the =CONCATENATE() function. I can't seem to get it to pull variable information, only the variable name for some reason, but according to this it "should" work. Hopefully you'll have better luck than me.
In Field A add in the formula
=IF(FIELDB<>"",FIELDB,IF(FIELDC<>"",FIELDC,""))
Then you can use the field rule on Field A to say Disable Field A if it is not blank. That should give you what you are wanting.