UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Lookup And Datamacros, Access 2013 Web App    
 
   
EBain
post May 2 2017, 03:24 PM
Post#1



Posts: 14
Joined: 10-February 17



Hey Everyone,

I built an employee tracking database a while back in Web Access 2013, housed on SharePoint 2013. A recent request was, when an employee is terminated or leaves the company, an email is sent to IT and HR letting them know to shut off access. I've created a data macro that compiles the email and sends it off. The problem I am running into... They want the email to reference the employees previous team lead. This info is currently stored in a separate table, then referenced via a lookup field in the main [employees] table. So when I create my Data macro and use Employees.team lead the response is returned as a number, instead of a name, due to the lookup reference. Anyone know how I can force this to display the name?

The team lead table only has two columns the Primary ID and the name of the team lead.

I've attached screenshots of the datamacro (WAEmail1 is the top half, WAEmail2 is the bottom half.)
Attached File(s)
Attached File  WAEmail1.png ( 30.61K )Number of downloads: 5
Attached File  WAEmail2.png ( 33.42K )Number of downloads: 6
 
Go to the top of the page
 
GroverParkGeorge
post May 2 2017, 03:37 PM
Post#2


UA Admin
Posts: 31,239
Joined: 20-June 02
From: Newcastle, WA


First, I hope you are already aware that AWAs are being terminated.

If you have an on-premises SharePoint site where yours are running, they will continue to work for the lifecycle of the current version, perhaps 5 years.

If you are using Office 365, Access Web Services will be turned on in April, 2018. Your databases will no longer be available after that.

So, that said, what I would doing at this point as the highest priority is probably identifying an alternative strategy for this application.

In the meantime, what you need to do is create a separate Data Macro. Pass into it as a parameter the ID of the Team Lead. In the data macro, use the "Lookup a Record", i.e."LookupRecord", action to find the team lead whose PK corresponds to the ID passed into the Data Macro. Set a ReturnVar to the "teamLeadName" field in that record. The ReturnVar will be passed back from the Data Macro for use in the email.

--------------------
Go to the top of the page
 
EBain
post May 23 2017, 04:44 PM
Post#3



Posts: 14
Joined: 10-February 17



Thank you so much for the info! It worked perfectly! (sorry for the delayed response I got busy with a new project).

Thanks also for the AWA info, that's good to know!
Go to the top of the page
 
GroverParkGeorge
post May 23 2017, 04:49 PM
Post#4


UA Admin
Posts: 31,239
Joined: 20-June 02
From: Newcastle, WA


Glad to hear you resolved the problem. At this point, though, I'd recommend moving to a viable alternative, rather than continuing work on something new in AWAs.

--------------------
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 11:27 PM