Skip to main content

Link Fields Node JS

  • June 14, 2020
  • 1 reply
  • 8 views

Hi

  • I have a table called mentors
  • I have a table called jobs
  • I linked the two with a link field
  • what I m trying to do is to display the job name instead of the job id

      const title= 'Prenez en main votre vie pro   | CarriereMatch.com'
      
      const getRecords = async () => {
        var test ="string"
        const records = await mentors
          .select({maxRecords: 6, view: "Grid view"})
          .eachPage(function page(records, fetchNextPage) {
            records.forEach(function(record) {
              jobs.find(record.fields["Quel est votre métier actuel"], function(err, record) {
                if (err) { console.error("Big Error",err); return; }
                console.log(record)

              });        
            });
           
            fetchNextPage();  
          });     
        }

        getRecords()
        .then(function(records) {   
          
         res.render('index',{title: title, records}); 



     });


1 reply

Forum|alt.badge.img+3
  • Inspiring
  • 63 replies
  • June 17, 2020

Salut Chris!

I’m not sure what you’re trying to accomplish here, is this returning an error?