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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,641,216
Community Members
 
Community Events
196
Community Groups

How do I set a Confiform Field value to the value of 2 other fields

I have a field in my Confiform that is set as the Primary Key in my database. The primary key is made up of the values of 2 of the fields on my form.

But when I use a Confiform rule to set the value of the Primary Key it only sets the value as the first field.

 

My Fields:

PrimaryKey - Set by rule

KeyPart1 - set by user

KeyPart2 - set by user

 

Rule:

PrimaryKey=[entry.KeyPart1][entry.KeyPart2]

1 answer

1 accepted

3 votes
Answer accepted
Tim Oldendorf
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.
Oct 26, 2018

This might work for you:

Change the PrimaryKey field type in the definition to be a formula field type. And then use a formula to concatenate the values together.

 

For example: in the formula enter this: 

CONCAT("[entry.KeyPart1]","[entry.KeyPart2]")

 

So then if KeyPart1 = Hello and KeyPart2 = World when the user submits the form it should give PrimaryKey a value of HelloWorld

2018-10-26_16h17_20.png

The example above HelloWorld has no space between two field values. How is a space added to get a space or dash between the two field values, to Hello World?

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.
Mar 01, 2021

Just put the space where you need that... as easy as that

for example, right after the [entry.KeyPart1]

CONCAT("[entry.KeyPart1] ","[entry.KeyPart2]")

perfect! thanks.

what about using this in a filter within tableview for example, fy:CONCAT("FY","([entry._now.jiraDate().split(-).get(0).trimLeft(2)]+1)") 

the second part is evaluating current year, the second part works perfectly on its own but I want to add FY on the left side. Please help, thanks 

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.
Jun 05, 2023 • edited

Try this

fy:[entry._now.jiraDate().split(-).get(0).trimLeft(2).add(1).prepend(FY)]

or... make this easier

fy:[entry._now.formatDate(yyyy).add(1).prepend(FY)]

Alex 

Like Markisio likes this

Thanks @Alex Medved _ConfiForms_  works perfectly with 

fy:[entry._now.formatDate(yy).add(1).prepend(FY)]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events