You are viewing limited content. For full access, please sign in.

Question

Question

Forms - IF formulas - copy value of one field to another if field isn't empty

asked on June 28, 2024

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!

0 0

Replies

replied on June 28, 2024

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!

0 0
replied on June 28, 2024

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.

0 0
replied on June 28, 2024

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?

0 0
replied on June 28, 2024

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.

https://answers.laserfiche.com/questions/119123/Dynamically-merge-the-content-of-2-fields-onto-1-field#119178

0 0
replied on July 1, 2024

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.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.