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]
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just put the space where you need that... as easy as that
for example, right after the [entry.KeyPart1]
CONCAT("[entry.KeyPart1] ","[entry.KeyPart2]")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
perfect! thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Alex Medved _ConfiForms_ works perfectly with
fy:[entry._now.formatDate(yy).add(1).prepend(FY)]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.