Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..
475 views

using subroutine fill.fc

I saw a couple of older posts from a few years back that explained how to set up fill.fc on format control to auto-populate fields.  I am trying to get contacts to have the city, state, zip info to live on the contact record and not just be displayed through a virtual form.  (This is what I've been asked to do by the powers that be)

I created new fields in the contacts dbdict called fcb.city, fcb.state, fcb.zip.

I have edited the contacts link record.  OOB it had 4 lines for location.  I added fcb.city to all 4 lines (if I don't I get more errors).  (Once I get city working, I will go back and add fcb.state and fcb.zip to the link.

I have created the fill.fc subroutine on the contacts format control.  I have set Add, Update, and Before to true.  the application field is set to fill.fc.  under paramters I have

record = $file
text = fcb.city
string1 = contacts

When I go into a contact, if I change their location and click the fill button, then the city info pulls in.  But when I click on Save I get "No link exists for this field, fill function cannot be performed."  If I do a mass update on a list of contacts, I get the same message and nothing updates.  I need this info to populate automatically.  Every night we pull this info in from the source via WSDL and I would need any net new changes to auto populate.   Clicking the fill button on each record is not feasiable.

Any ideas?

0 Likes
3 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: using subroutine fill.fc

When you pass the field name for fill.fc, you need to pass the name of the field that is the source field to select the contact record you will use to fill the related fields. 

I suspect that you should use:

text - contact.name

The link line details for the contact.name field includes the fields that will be populated at record save (city to fcb.city, for example). Currently, it looks like the application is looking for a link line for the field fcb.city,  but there is not a link line for that field itself. The link link it for the contact field.

 

Note also that fill.fc was superseded by the us.link application: best practice has been to call us.link and specify that a fill action be executed (as opposed to a find).

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: using subroutine fill.fc

Thanks John, I used us.link and fixed the field name I am passing (which in this case is actually location.full.name) as I am trying to pull into info from the location table into the contacts table.

I have gotten a little further.  Now, in addition to clicking the fill button and it populating what I want, I can also just click Save and the info pulls in. 

But it doesn't seem to work to do a mass update on a list of operators and have the autofill actually execute.  Basically I want to be able to do a mass update or some sort of mass save and have that subroutine kick off and update all contact records and pull in data from the location table and update the new fields on the contacts.

 

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: using subroutine fill.fc

Also, forogt to say that when I try to do a mass update I get the error "Field expression not found (us.link,check.date.field)" for each operator that doesn't already have the new fields populated.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.