Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Setting a field value based upon another field in a form

Hello. Can someone tell me the best way to set a field value based upon another field in the same form?

Say I have:

Field1: DatePicker.Value

Field2: UpdatedField

Field3: Yes or [empty]

Here is what Id' like to do. I'd like to update Field2 with the value from Field1 but based upon text is Field3. If Field3 has a "Yes" then I'd like to update Field2 with the value of Field1 adding 7 hours to the value. If Field3 is empty I'd like to update Field2 with the value of Field1 adding 17 hours to the value.

I have tried various functions like "Rules for Field Def" or "Field Definition" with formulas but what I'm seeing is the form (Field1 selected twice) has to be updated twice to be able to switch between the values correctly. What I need is when Field1 changes anytime, update Field2 with the proper values outlined above.

I looked into the IF statement but I don't know if that can be used in the Rules macro or not. I'm not finding much in the samples. But I'm still looking. If anyone knows, then please get back to me.

Thanks.

Glen

1 answer

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Sep 18, 2021 • edited

Hi Glen

There could be multiple approaches, including the one with formula or setting the expression (instead of Set Value action in "ConfiForms Field Definition Rules" macro)

 

Here is the one (on many) solutions that you can implement

http://recordit.co/paLkpHDb3S

 

Also, you may want to ask ConfiForms to calculate a bit more (probably will make it better maintainable in the future)

Field2=[entry.Field1.add([entry.id.evaluateFormula(3600000*7)]).formatDate()]&Field22=[entry.Field1.add([entry.id.evaluateFormula(3600000*7)])]

See, here I am asking to calculate 7 hours for me in milliseconds

Alex

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events