1

Formula issue

Hey guys, I have the following problem:

I'm using a formula which shows data from a table with two columns, let's say column1: "title" and column2: "organisation". I want the formula to show the records one at a time, meaning "title1+organisation1" + "title2+organisation2" etc. Instead it shows "title1+title2 etc"+"organisation1+organisation2 etc".

PLEASE HELP!!!!

Thank you very much!!!

35 replies

null
    • pirinisz
    • 1 yr ago
    • Reported - view

    Any luck you guys????

      • pirinisz
      • 1 yr ago
      • Reported - view

      pirinisz On table1 the first arrow is where the formula with the "join" code should be

      • Fred
      • 1 yr ago
      • Reported - view

      pirinisz the file is fine. It will take a bit of time to wrap our heads around the field names and table names. 

      • pirinisz
      • 1 yr ago
      • Reported - view

      Fred Table1 is the contacts, table2 is the organisations and table3 is the position

    • Fred
    • 1 yr ago
    • Reported - view

    So when I type in:

    join(for i in 'Θέσεις/Καθήκοντα' do
        i.'Θέση' + " :" + i.'Οργανισμοί'.'Τίτλος'
    end, "
    ")
    

    I get:

    Is this what you want? You can modify the spacing around the colon. :)

      • pirinisz
      • 1 yr ago
      • Reported - view

      Fred Good morning and YES THIS IS EXACTLY what I want. I found my error, instead of just typing, I was choosing the field from the list on the left of the code form, so instead of i.'θέση' the input was i.'θέσεις/καθήκοντα'.'θέση'!!!

      THANK YOU SO MUCH guys for your time and effort!!!

      HAPPY NEW YEAR!!!!!!!!!!!

    • Fred
    • 1 yr ago
    • Reported - view
    pirinisz said:
    I found my error, instead of just typing, I was choosing the field from the list on the left of the code form, so instead of i.'θέση' the input was i.'θέσεις/καθήκοντα'.'θέση'!!!

     As I slowly learned you have to very aware of which table you are working from in the line of code you are in.

    You are creating a formula in the Γρ. Πρωτοκόλλου/Εθιμοτυπίας table. So all of the fields in the left side are from that table.

    But the formula in the Γενικός Τίτλος field references the Θέσεις/Καθήκοντα table:

    for i in 'Θέσεις/Καθήκοντα' do

    so you have to imagine that everything that you use the "i" variable starts from the Θέσεις/Καθήκοντα table.

    i.'Θέση' + " :" + i.'Οργανισμοί'.'Τίτλος'

    When you get a chance please mark the post as answered.

      • pirinisz
      • 1 yr ago
      • Reported - view

      Fred Thank you very much for the info!!! Be well!!

    • pirinisz
    • 1 yr ago
    • Reported - view

    Fred RoSoft_Steven Hey you guys, just another liitle issue I came across with: how could I separate each record in a table view??

    Right now it shows "president Organisation1 clerk Oraganisation2".

    How could it show for instance "president Organisation1/ clerk Oraganisation2" or

    "president Organisation1 and  clerk Oraganisation2"

    • Fred
    • 1 yr ago
    • Reported - view
    pirinisz said:
    Hey you guys, just another liitle issue I came across with: how could I separate each record in a table view??

     I'm not sure what you mean by "separate each record in a table view"?

    If you want to change how the records are separated in the field you can change what is used at the end of the join() function.

    carriage return:
    join(for i in 'Θέσεις/Καθήκοντα' do
        i.'Θέση' + " :" + i.'Οργανισμοί'.'Τίτλος'
    end, "
    ") <--note you actually put in a carriage return no special character needed
    
    slash:
    join(for i in 'Θέσεις/Καθήκοντα' do
        i.'Θέση' + " :" + i.'Οργανισμοί'.'Τίτλος'
    end, " / ")
    
    words:
    join(for i in 'Θέσεις/Καθήκοντα' do
        i.'Θέση' + " :" + i.'Οργανισμοί'.'Τίτλος'
    end, " and ")
    
      • pirinisz
      • 1 yr ago
      • Reported - view

      Fred you're the best man, thanks!!!

Content aside

  • Status Answered
  • 1 Likes
  • 1 yr agoLast active
  • 35Replies
  • 226Views
  • 3 Following