Announcement

Collapse
No announcement yet.

Link 2 selection fields together

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Link 2 selection fields together

    Hello all,

    I would like to connect 2 selection fields.

    My intention:

    The field "name" should get the content from 2 selection fields.
    We offer courses at our company.
    The first selection field has the content about which course it is, of type single selection,
    the 2nd one is the contact name, coming from the Contacts entity.

    When I work with the formulas, I get the value of the first field, but from the 2nd one always comes "zero"

    The meaning behind this:
    So that I only need to show the "name" field in the list.
    Currently I have both listed, type and contact.
    The problem with that is, when you click on the contact, yes it takes you to the contact list and not the course.
    With this plan, it should be more consistent and eliminate the need to manually enter the name.

    Does anyone know with which formula the name of the selected contact can be read out?

    Furthermore, I have the problem that I still have a unit "Course overview", where all courses per customer are summarized again. I wanted to display only the phone number and e-mail address of the contact with the external reference field. So that one does not have to go each time on the contact around the data to indicate. But nothing is displayed.

    Thanks a lot​

  • #2
    How are you trying to display this? There is many method.

    1) As a foreign field (Entity Manager > Field)
    2) As a formula (uh... formula)
    3) As a PDF Print (PDF Template)
    4) As a copy/paste into the linked relationship (which is pretty much formula)
    5) As a relationship (bottom panel)

    If you doing this as a formula like me, here is a sample code I use for my formula. It is a full code with information filtered but it give you better idea.

    It is a Case Entity, and I link it to many different relationship:

    Code:
    if (type=='Case' && status=='Assigned') {
    Description = string\concatenate(
    '## Title One', '\n',
    '> Info 1: ', '\n', entityRelationnamePropertytoCase.title1,'/', entityRelationnamePropertytoCase.title2, '\n',
    '> Current Address: ', '\n', contact.addressStreet, ', ', contact.addressCity, '\n ---',
    '\n ## Contract Info: \n',
    '> ', entityPropertytoCase.propertyName, '\n',
    '> Description: ', entityRelationNamePropertytoCase.description, '\n \n',
    '## Contact Information', '\n --- \n', '[Open/Go to Contact](#Contact/view/', contactId,') \n ', //work in progress, contact, i'm trying to create hyperlink here but fail at the moment.
    '> ', contact.firstName, '\n', contact.middleName, '\n', contact.lastName, '\n',
    datetime\format(contact.dateOfBirth,"DD/MM/YYYY"), '\n', contact.phoneNumber, '\n', contact.emailAddress, '\n', //may give error if no Date of Birth, need to create a stopper.
    '> Property Address:', '\n', entityRelationnamePropertytoCase.addressStreet, '\n',
    '> Property Type: ', entityRelationnamePropertytoCase.type, '\n \n'
    )};​
    The result look like so:

    Click image for larger version

Name:	image.png
Views:	286
Size:	18.7 KB
ID:	91579
    Last edited by esforim; 04-26-2023, 08:48 AM.

    Comment

    Working...
    X