logo

NJP

Mobile App Academy: Configure navigations for the ServiceNow mobile apps

Import · Jul 23, 2020 · video

good morning good afternoon good evening everyone whether you're joining us live or on demand we want to welcome you back to our mobile app academy uh today we have a great show for you um my name is charlie seiner and i personally want to welcome you back or if this is your first time welcome um i do recognize quite a few names in the chat so thank you again for spending your tuesday morning evening afternoon uh with us and just so you know if you're new around here um welcome again uh these shows happen every two weeks 10 a.m pacific uh on tuesdays so mark it on your calendar we'll send out an invite and we love to see you in here if you're brand new definitely let us know in the chat as well um you know this is really driven by you and we want to hear your feedback we want to hear what you're working on uh so any insight we get whether it's from you whether it's here whether it's our mobile community is great and we look forward to reading all about it so do let us know all that said david hoff take it away our senior project manager our favorite our trusted presenter david come to you thanks for the intro charlie good morning everyone and welcome back to our mobile app academy my name is david haw and i'm an outbound product manager here at terpsnow i want to give a warm welcome to everyone here joining us live and uh we'll go and just kick it off so for today's topic we'll be doing a live building session showing common ways to navigate around the mobile app and look up information with context using a navigation function a related list an embedded list and uh also uh an advanced use case using carry parameters and how you can use it within your own workflows so with the mobile workflow that we'll be building uh today uh we'll cover the following we're gonna be using the out of the box it sound mobile asian app which can be installed in the from the servicenow store so we're going to be focusing on the asian fulfiller use case um but uh just know that the concepts learned today can also be applied across now mobile or onboarding as well and since uh uh the outbox itsm asian workflow is already available to use we're gonna use that as a template and build on top of it so these are things that you can take and apply within your own workflows um there's also some pre-built applets that show active critical incidents uh but you know what if an agent needs additional context to these records um and they also want to see a related list how do i configure that so that'll be our first use case configuring a related list our second use case is my agent is looking uh through the details of an assigned incident and what if they want to pull up a kb article to look up the short description of that instant how would i use a smart button to take me uh there directly from that record so we'll configure a smart button that will navigate me to kb articles uh using the context of the incident and then for the third use case uh we will configure an embedded list to show how agents can quickly pull up another list directly from the form screen and then for our last use case um there's many times where you navigate to a related list and you want to create new records on that list but you also want to pull context from the parent list so if i'm navigating from applet a to apple b and i uh want to create a new function and create new records on applebee how do i also use the context from apple so we'll be using carrier parameters for that use case uh so these will be all the talk boots that we cover in today's session and just a reminder if you're new to mobile we recommend that you check out our resources on mobile community uh there you can find quick links to our mobile implementation guide as well as our trainings and labs on now learning in the developer site and these will essentially give you a rundown and familiarity with mobile studio and with the now platform ui uh which you will need to be successful with today's session also a reminder mobile app academy moving forward will now take place on orlando instances all the features that we showed today are also supported on the new york instance however the configurations may look different if you are using new york okay so with that uh being said this is a live building session that will last about 50 minutes and then we'll open up to q a in the last 10 minutes if you have time um if there's any pressing questions we can bring it up along the way as well so feel free to ask your questions along the way um and then at the end of the presentation we'll circle back and address any other questions as well so without a further ado let's go ahead and dive straight into it so let me go and share my screen so for today's session you're going to want to make sure that you you have installed the servicenow agent app from your devices app store uh in our previous academies we have been primarily focusing on the pre-built mobile experiences for now mobile um and if you're new to mobile and you're looking to enable the now mobile employee use cases i highly recommend checking out our past videos on the servicenow now community youtube channel the first eight or nine videos will walk you through the common ask uh on how you can uh customize your now mobile workflows to fit your business needs but for today we're gonna be focusing on the servicenow asian app and the pre-built experiences for itself in orlando and so to set up your environment for our exercise today you're going to want to make sure that your instance is upgraded to orlando and then once it's upgraded to orlando you should already have your basic mobile plugins automatically installed so once upgrade happens you'll automatically get mobile studio and all the components that's relevant that will allow for mobile configurations and these base plugins will give you access to mobile studio as well as automatically enable agent um but to get your agent app to work you need to enable at least one out-of-the-box experience and a common experience that we enable is the itsem one and i want to mention that there is a new itself mobile plug-in that can be found on our service cloud store um and it's different than the old it7 plug-in from madrid in new york it provides new applets and apple launchers that you can take advantage of or use it as a template to add to your mobile flows so if i look at my plugin list um i'll show you both the old plugin as well as the new plugin but just know that if you want to install the new i27 mobile plugin you just click on this find in store um and it should pop up in there so let's give this a second to load okay and if i look up mobile agent you're in seats uh or maybe just it's um you're going to see two uh plug-ins this is the old one where it's just called it some mobile and then there's the new one which is issl mobile agent and you can see that it's from the servicenow store so you see that this is installed so i'm pretty much ready to start configuring this app um so now that i'm good to go let's go ahead and hop over to our mobile device we'll click into your agent app and this is the old experience and here's the new experience um so the plugin that we installed comes with three tabs including my work my team and major incidents so here i'm logged in as an agent and at the top of my screen i can see my critical instance if i tap into a record i can see additional fields here but it does look like there's an activity stream or a related list that was pre-built into this so let's go and enable this now and we'll start with enabling the activity stream first so let's go ahead and open up mobile studio we'll jump into your itsm mobile agent scoped application and then we're going to find our critical instance applet so we'll do a control file for a critical instance here's our critical instance applet if i look at my form screen i would expect that there's no um uh there's no activity stream which is true it only has details so let's go ahead and modify the segments here and then we're going to enable the activity stream as well as the related list so let's go ahead and click save and then we'll click save so now if i refresh my apple and then i click into instance i now see my activity stream you don't see any related lists yet because we need to configure them first so um the first use case that we're gonna dive into is how do i configure a related list in scratch so to get this working we're going to need to do the following first we're going to create an applet for the related list that we want to show and in this example we're going to want to show a related list that shows me um instant task so for all my critical incidents show me my related instant tasks um and once i create the applet for that we'll then configure the related list here we'll state the relationship the destination screen and then we'll be set so let's go ahead and configure this now starting with creating a new applet so i can either create new continue building within the scoped application or i can also create a new scoped application if i want to um but it's much easier to modify if i use the out of the box itself mobile agent mobile studio does a really good job handling one scoped application at a time so you know if you want to extend the workflows for these or customize it i would recommend staying with inside the out of the box but just know that you can use your own custom scoped applications so let's go and create the new applet now for uh instant task which i want to set as my relate list so we'll call this instant task related list we can give it an icon and color if we want just give it a random icon and color this will be a list applet and i'll bring over my form screen as well and then with every applet needs a data item so let's create that now for this data and we'll call it incident task related list di and then the table is going to be instant task and then we'll click save um this applet is going to need to be a parameterized applet and the reason why is because when i click into uh this critical incident it needs to know which instance it needs to point to and so that parameter needs to point to that current instant so i'm on that instant task table and it needs to know which instrument it wants uh us to pass to so uh whoops let's create a new parameter here and we're going to call this incident it'll be a string type field and then in our query we're going to map incident field from our instant task table and we're going to point out map it to our parameter okay then we'll click save so now i have a parameterized data item we'll associate this data item back to our list applet which is we call it instant task related list di let's go ahead and bring over some fields for e1 ob state number e2 short description uh priority e5 we can bring a bring over assigned to uh this is expecting an avatar or image type field so we'll bring over the avatar first and then we'll bring over the text field for scientific and then in the form screen we'll just replicate from primary and then we'll click save okay so now i have the applet ready for my instant task related list so now all i have to do is configure the related list back on our critical instruments right i have the related list now it needs to be associated to the original applet so we'll go back into critical instance applet on my forum screen i'm going to click into the body and on the body there's a segment called related list i'm going to create a new relay list here and then i'm going to set my destination screen to the applet that i just created which is called instant task related list and then for the relationship we're going to want a relationship that points um instant task to instant okay so you might be wondering how would i know if this is the correct relationship and if you want to know if this relationship is supported for your related list i'll navigate back into my instance and i'm going to open up the parent table which is instant and then i'm going to click into one of these incidents okay so relationships that are supported the field has to reference uh the field directly and what i mean by that is if you go into the instant and i go into my related list there's really a list for instant tasks if i right click this and i open this up in a new window you'll see that this instant task the incident field is directly referencing the instant task table and so i know that this is supported and if i go back to my incident and i show my related list there should be a relationship called instant task to incident and so this is a supportive relationship and that's the relationship that i want for this related list so this is the correct one here and then i'll go ahead and click save okay and then i'll save almost video and now if i do refresh all my critical instance i'll go back to my homepage refresh i'll click into an instant relay list oops see what happened here okay uh let's make sure i pointed to the right destination screen uh instant i think i call this task hey david uh go to your forgot okay yeah go to your list screen right so i created the uh good cache foo so i created the applet uh and the data item with the primer but i missed a crucial step back on my critical incident i forgot to map the parameters so when you click save on this applet um let's double check my data item uh i i'm expecting ui parameters in a mapping here so if i open up my data item again let's make sure that these parameters were not oh no that's not the right one uh incident task data item here it is okay uh so this is a great troubleshooting example here so i have my parameter it's mapped uh and i go back to my applet these are the parameters that i forgot to fill in right so i'm going to create a ui primer for this uh and this will be instant it'll be a text type we'll click save and then we just got to map our item primer back to our ui parameter mapping the primers are super important to get this to work so on our item primer we call it instant instant so what it's doing here is you know it it's expecting you're it's asking what instant we're going to pass this critical incident to so that way it knows which instance to open up in our related list so we'll click save and now if i do refresh this should work and there it is so i have one instant task related list and there's a test record there okay so that's how you configure related lists um the next example that i want to show is uh how you can configure navigations to different applets so inside of my critical instance applet i have these additional fields here i have category caller and impact what if i want to navigate to this caller carol uh i want to see additional um fields on her like what's her phone number um what's her email and things like that so what i'm going to do is i'm going to uh configure a navigation that allows me to quickly look up information on this person for this caller and i can do that by configuring a navigation function so that when i tap on the caller field it'll take me to an employee directory which will show me more information on carroll so to get this working we're going to be doing the following first we're going to create an employee directory with the fields that i want to show then we're going to create a navigation that takes me to that employee directory applet and then lastly we're going to associate the navigation function on my critical instance output so let's go and configure that now we're going to start by creating the employee directory applet uh we're going to select the employee directory template we'll call this employee oops call this employee directory uh applet dh uh we can give an icon in color i'll click create new and then for our data item we'll create a new data this is going to pull um excuse me this is going to pull from the assist user table so let's look up sysuser we'll call this employee directory template di and then we'll click save and then this is also going to need to be parameterized because it need the it needs to know which um which field i'm going to be passing this to so we're going to create a parameter for cis id and this this id is eventually going to be passed into the caller field so i'm going to map cis id to sysid click save um and then back on our applet let's select our data item for employee directory we'll select our fields so the first one we'll bring over avatar um name department maybe title as well and then the profile screen which is just the details of that employee we'll uh replicate from primary and in the body i can put more fields like phone email and so forth okay we'll click save all right um and now we're going to map our parameters so we're going to create a new ui primer versus id it's gonna be text we'll click save and then we just gotta map our ui parameter to our uh item parameter sys id to sys id and then we'll click save okay so now my employee directory is done uh so now the next thing i need to do is create the navigation that takes me to that employee directory so we're going to scroll down on our left hand this is a little bit much so i'm going to minimize all these components open on mobile studio now to big cleaner so under functions there's a function for navigations we'll create a navigation for give it a second to load okay so we're going to create a navigation that navigates me from the critical instance output to that employee directory when i tap on this field for caller so we're going to call this navigate to employee directory uh dh let's call it two the destination is gonna be the employee directory applet that we created uh the context is record because it requires context from this field to know where to navigate to and then for the table i'm gonna select uh the incident table because i want to be able to navigate from the caller field from my instant table i'll click save um and then you're going to see this parameter field here we need to fill in uh what field that's going to allow me to navigate there and it's going to be the color field so i'm going to select my color field for my redirection parameter i'll click save and then we'll click save all right so now my navigation is done so this will navigate me to the employee directory output so the last thing i have to do is just associate this navigation back to my critical instance output so we'll open up a critical instance whoops pretty cool it doesn't want me to find okay so critical incidents so this is my form screen um so i want to put the navigation on my form screen not my list screen so we'll click into the form and then the functions us so in the functions on the form this is for the top menu but if i click into the body if i scroll down i want it to put it uh this navigation in the field functions field functions just mean i want to put a function on one of these fields so i'm going to create a new field function and i'm going to the only fields that are going to pop up are the fields that you select in the body of this form so that's why you only see three fields i want to navigate to caller and the navigation is the one that i just just created which is uh navigate to employee directory click save now if i click save i should be able to refresh my app and then review the changes so if i click into a critical incident you can see that there's now an arrow next to caller and this uh lets me know that i now have navigation there so my navigate i now see a list uh first a list view of uh of carol and then if i click into the list view i now see the form screen of carol and i can add additional smart buttons so that um we can make this native so i can uh send an email natively or uh make a phone call to her natively if i want to i'll just have to configure additional smart buttons here okay so that was my use case of navigating to uh different uh applets so the next navigation that i want to show is what if i want to navigate to uh an external url and uh a common use case that we hear is you know if i have a critical incident or maybe even a work order task uh what if i want to create a kb in this top menu here that takes the short description of this so that my agents can quickly look up the kb on this record in case they need more information on it so what we're going to do is we're actually um we're going to create a smart button uh with a type of url that navigates me to the service portal kb and we're going to create a a scripted url applet or a scripted smart button that parses the short description and then passes it directly into that url so that when i click on this top menu function it will take me directly to the kb on service portal and then i'll also um automatically look up add memory to laptop okay so to get this working um we're going to first create the smart button type url and then we're going modify uh and then we're gonna associate that smart button to the top menu of this form okay so let's go ahead and configure that now um let's first create our smart one uh which is under functions on our left-hand math we'll click smart button and create a new smart one okay so there's actually a known defect that i'm going to show you really quickly um so in new york uh there was a field for um relative url that was here but in orlando it seems like that field is missing so if you want to actually do this use case you have to configure it on platform ui so this is unknown defect we're working on it it will be fixed in a later patch just know that um the relative url field is currently missing so what i'm going to do instead is i'm going to create a smart button on platform ui but now clock will be like so on our left hand nav outside of studio we're going to open up functions and we're going to create a smart button function we'll change the type to url with all the different smart buttons our url phone address and email but i'm gonna want a url smart one here uh we'll call this uh navigate to kbdh uh it's gonna require uh contacts from the record because we want the short description from this incident and then in the uh link label uh or the link url we're gonna want to navigate to the service portal kp so let's open up a new tab uh duplicate and let's open up service portal kv real quick we'll open up our service portal and then um i want to go to knowledgebase okay so let's say i want to look up so the reason why i i'm just trying to get this dynamic url up here and so i just looked up instant as and as an example so this takes me to uh this appended url here so this is what i'm looking for so i'm going to take this appended url here and this is a query that's looking up instant but instead of incident i want to change this to a dynamic field and how i can do that is i'm just going to put a couple brackets around this and then i'm going to change this instant it's hardcoded instant we're going to change it dynamically to making it look up short description uh short description this is the actual column name on that table um but then it's also going to need to know uh what table that you want to look up for your short description from so we're going to add another piece to this we're going to do and sys parm to look up the kb search table and the table name is instant okay so now i've changed this to change this so that it dynamically looks up short description off of my instant table and then i'm going to copy this appended url and then i'm gonna paste it into my url function here and then we're gonna make sure that this is using relative url um so it's just looking up anything within my instance right and then the link label will say navigate to kb and then we'll uh the table is going to be instant and then we'll click save so now i have a smart button that dynamically looks up the short description field from my instant table and the type is url and the context must be record because it requires uh context from this uh record okay so now that my smart button is done all i have to do is uh the last step is just to associate the smart button back to my critical instance output applet and i want to associate it to the top menu of my form screen okay so we'll jump back into studio and in studio we're going to open up our critical instance applet again so this is my critical instance applet we're going to open up the form screen and in the overall settings this is my list this is my entire form screen here i'm going to click into the functions and here's my top menu so let's associate the smart button here we'll call it navigate to kb and we're going to select the smart button that we just created which is navigate to kbdh and then we'll click save okay so now if i refresh my app and i click into a record in the top menu i now see that there's a new function if i click navigate to kb it will automatically parse the shark's description which is add memory to laptop and it automatically looked up um all of the kbs are available okay so that's how you um configure a dynamic url and navigate there okay so um for my last example uh before we move on to carry parameters is embedded list so embedded list was a feature that's we introduced in new york but it's not heavily used so i definitely want to um explain the use cases here and how you can use it with your own workflows the configuration steps are slightly different in new york uh and in the way that in orlando we actually simplified the process so it's much easier to configure um uh embedded lists to configure new york there was a lot of platform ui configurations um but now in orlando with just a few clicks you can configure one in just a few seconds so let me show you that now [Music] the use case here is essentially if you want to show if you look at my mobile app i have a segment for details a segment for activity stream an extended for relay list you can actually add an additional segment here to show up any list that you want um so typically if uh your agent only needs to see one related list we can actually reduce this extra click and take me directly to or show me directly the list screen within this segment right so um if they have multiple really list then uh it's recommended that you use a related list applet right but if you only need to show one embedded screen which is just another list applet um then you can use embedded embedded screens so uh let's go ahead and configure that now um to get this working we're gonna need to do the phone uh we're gonna reuse this um the instant task applet that we created earlier right this is the instant tennis applet that i have i'm just going to reuse this one um and then we're going to enable embedded list on our form screen and then set the relationship as well as destination screen so the configuration is very similar to relay list so let me show you that now we're going to open up our critical incident applet so where's our critical instant output okay so here's our critical instant output and on my form screen in the body there's a button that says modify segments traditionally you'll see details activity stream and relay list if you're not aware there is now a new feature that's called embed list if i enable that and click save um i now have an embedded screen um in which the configuration is very similar to related lists you define your destination screen and then you define your relationship so uh i'm not going to complete this configuration yet i just want to show you what pops up if i were to reconfigure this so i want to show my instant task as a fourth segment um so the destination screen is going to be my instant task and then the relationship which we defined earlier um is instant task going to incident okay so if i click save there's me a warning message that says this is going to change your data item um by creating this embedded list relationship the data item for instant task will be changed um so any applets that's currently using this data item will also be affected um do you want to continue so um because i'm using the same applet to show it both on my earlier list and my embedded screen i'm gonna i'm actually gonna create a new applet because i don't want this related list to be affected but typically you wouldn't show both the instant tasks both on a relay list and embedded screen so i just want to point that out but for this example uh let me just create a new applet so that my related list isn't affected so i'm going to do i'm going to create another instant task um embedded screen and give it an icon and color if we want this will be a list applet we'll quickly create a date item oops there you go okay quickly create a data item i'll call this instant task embedded string this is pulling from the instant task table and then we'll click save so now that i have my data item done we'll just associate the data item instant task the screen okay so now i've associated my data and then we'll select over some fields we'll call this state for e1 uh e2 will be number e3 short description e4 priority e5 expecting image so we'll bring over avatar assigned to avatar um and then the last field will be the text assigned to uh in the form screen we'll duplicate from primary or replicate from primary and then we'll click save okay so i created a second applet for instant task so now i can associate it as an embedded screen so i'm going to open up my critical instance output again uh going back to my embedded screen on the form screen let's create this embedded list again so the relationship is instant task to incident and the destination screen is that new applet that i created specifically for this embedded screen which is instant task oh it looks like i have to really reload this screen so i'm going to reload the frame uh and that should refresh my changes so going back to the embedded screen i'm going to make sure my destination screen's here so instant task embedded screen and then instant task relationship going to incident okay this is going to change my data item which is fine because i just created a new one i'll click ok and then we'll click save and now if i refresh my app i'll click into an instant and here you can see that there's a new fourth embedded screen um for understand task and there i see the list screen immediately the related list is different where it first shows me the count of how many um records are within it and then i get to my list screen and then i click go into my form screen so with the embedded screen you immediately see your list screen so it you know it improves the user experience by removing that additional tab um so this is kind of a clunky naming convention here um it's recommended that you use uh i think it's 12 characters or less that way all the text shows and then also you don't want this embedded all your segments to be clustered like this so we actually recommend to use no more than four segments at a time and maybe even ideally three um so if i want this to show up better i would rename this to something else okay so that was uh all the things that i want to show um for related lists for navigations how to navigate to an applet and how to navigate to urls and then we showed um embedded list and now i'm actually going to pass it over to my colleague um and he's actually gonna walk us through and talk through some of the use cases for carry parameters and he's gonna build on top of this so from my uh related list i have a really list for instant task what if i want to create a new record here and when i create that record i want to pull some fields from my original incident applet so you need carrier parameters in order for this to work and i'll go ahead and pass it over to food you us a deep dive on this so i'll go ahead and end my screen share food and then i'll let you take away great thanks everyone thanks david let me share my screen uh david do you see my screen yep i can see your screen perfect okay okay so before i talk about let's talk about carry priority so care printer is it's a is an advanced use case and um this is very common um that you might uh require this right so before i talk about or dive into configuration i want to talk about like why would you want to use it and i'll illustrate this by with an example so as david mentioned let's go to an incident right and if i go to an incident i know there's one here modders two okay so if i go to an incident and you go down to the bottom to relate to this um you notice that there's a thing called incident task right and when i create it platform automatically creates a new incident task uh this test task number but it also carries this incident number from the parent all right so it knows from this incident it carries this information down to this incident test when you create a new um in mobile you can't really do that by just when you create a a new incident task because it doesn't know anything about the parents and see the only way to do that is to use a thing called carry parameters and let's illustrate well let me let me show you what we're going to do oops this isn't wrong let me log into the right instance and then food would you mind zooming in on your window too just a little bit um yeah uh which window this yeah yeah okay um better yeah that's much better okay so let me log into the instance that david's been working on and so we're going to work on the critical incidents and when i go to critical incidents what he did was he created a related list that goes to incident task and here you we should be able to see a list of [Music] related incident tasks and what i want to do is i want to create a top menu function here that says create a new incident task and make sure that this task is associated with the parent of this number okay so uh let's do that now okay so first i'm going to go to studio and i'm going to since we're creating a new top menu function we have to create a thing called um action item so in an action item i'm going to create thing uh name it let's do this we don't need this for now we're going to first create an action item and we're going to name it cp create so that we don't get mixed up with all the function that we've just created so carry parameter and i'm going to say create a new actually create new create incident task and um there's a thing called type and right now there's there's four types when we create a new one typically you do declarative with new but i'm going to do a script just to illustrate that the carry parameter is coming through i'm also going to remove this use current record as condition because um when you do a top menu function uh it's going to be a global context and so this doesn't really mean anything i'm going to turn it off but you can leave it on a if you want but it doesn't mean anything so um you have to hit save and when you hit save you'll see that the item parameter will appear here and what i'm going to do is i'm going to create a an item parameter and we're just going to name it [Music] incident incident id it's loading there we go i'm going to call it incident id okay so once i created that um just toggle that and you can see it there um what i want to do is like i said i'm going to just display it just to make sure that it's coming through so the way to do that you you do gs.info add message info message and um if you want to display any parameter the trick is is that it's going to be in this input object and so what you want to do is you type in input dot reference this parameter so it's called incident id and this is how you get the value of it and then does that be verbatim does that include it's spelled correctly like completely correctly and yes yeah so um it has to be uh it's case sensitive um sometimes you see item parameter that's a good call out sometimes you see parameters um so if i create a new parameter sometimes you um maybe we've done a demo in a pass or you've seen other people do it is we can say like sys id okay my recommendation for item parameter is don't do spaces because um when you want to do scripting it doesn't know how to handle it you either want to do underscore or just make it as one word so this is just a best practice um if you do do like cis space id um it will work if you do declarative like this and it'll reference it but for best practices when you do scripts just make sure that it's this one word and so that you can do input dots it's an id so it has what david says it has to be exactly the same so i'm going to say that so this is safe once we've created our action item what next need to do is create an action function so expand here and we're going to create another function i'm going to get rid of this this thing that so here we're on the function and we're just going to call the same thing cp create incident task and this is going to be an action item type and because we're putting on the top menu function we have to change the context to global and this action item is going to be referencing what we just created so it's going to be cp create instant task and you notice that there's no ui parameters and so forth so what you gotta do is hit save and then it will appear the ui parameter so once we create we're gonna create a ui parameter and here we're just going to call it [Music] incident id and make sure that it's a text user input text so this is all pretty basic stuff meaning we've done this in the past how to just create a a function but here's here's the thing with carry parameters you notice that there's a thing called carried here and it's by default is false so click on toggle it to true so that's one thing you have to do okay and i hit save and the next thing is is very common is is you just got to map the ui parameter with the item parameter right here back to the function so let's call it let's map it okay so now we have our function done what we want to do is we want to associate this function with the applet of incident relate task related lists so let's find it in the applet so david called it instant incident task related lists and so what we're going to do is because it's a top menu function make sure that you're in a list screen and on the function there's a top menu function we're just going to add it here so we'll just call it create what's this create new incident task and the function will be a an action function and in the action function i've called it cp something right there cp create test so hit save okay so let's test it out and i want to show you that script uh what's gonna look like so so if i refresh this go to critical go to relay lists click on this you notice that there is a top menu function when i click on this create new task that is our function call and when i hit this notice that there's a message but there's absolutely nothing here right so um so this function is getting executed however the value is not and there's one more step that you have to do so in here there is a table here and so go here it's actually called sysg button underscore instance underscore carried underscored pair uh pram map that list underscore list we will document this for you guys but um uh right now you can see that this is the function this is the table i'm going to and what we've done is that we have to create a mapping and so create new and so this is this is the pretty confusing part from a lot of customers that we're hearing is that what does all this stuff mean so now the function instance okay now the function instance notice that i've created a function on this applet so here is the applet incident tasks uh related lists okay on this applet and i created a top menu function called create incident task when i do this label this is considered the function instance on this applet so go to here the function instance is what i just created here so it's that right so the function instance is basically the location of your action and it's the the label of that the one that you created correct okay next is the function ui parameter the function ui parameter is the ui parameter of the function so let's go back to the function so here's our here's our function the ui parameter is here which is incident id it's this guy hopefully there's no oh good there's only one perfect um and then the next one is screen ui parameter the screen ui primer is the screen ui primer of the applet so let's go back to studio here's the applet um go back to data field remember when david created a parameterized applet he had to create a ui parameter and so this is the screen ui parameter that we're interested in when the incident passes to this applet it is passing the sys id of the incident so it is coming through here so we need to get this parameter and put it oh gosh i don't hopefully there's you can rename it or yeah i guess we can look at it there's a whole bunch of them maybe uh to do a filter okay i actually see it from here oh there it is that might be the right one it's an interesting this is the right yeah this is the right one okay and this is why we need this this is really the list actually yeah uh is that the one you want i yeah this is the one i want okay so um just make sure that you have a unique ui primer sometimes you might conflict with other um other scopes so here you can see uh this incident right here is the one we're looking for because it's associated with the screen you hit save so here is my mapping or here just create incidents and so let's take a look at how it looks like now so when i create this when i click on this incident go to the related list and i click on create that this is the cis id of the incident right and so now i i now i know that now i know that it is coming through so what i want to do is go back to uh our action item and now you don't need to use script number now you can just say i want to create a new one and the table is going to be um incident task and when i create a new incident task i can just say incident is equal show this is equal to this and then you can just fill in the blanks short description and and create more item parameters and so this is how you create a new um a new um incident task by using carry parameter so this is using related lists there's another way to doing it too let's say for example you want to do a navigation so if i go to create incident i'll hit create see all and i want to navigate directly to the incident task and when you do a navigation function it can also carry uh the parameter as well so let's let's do that let's extend this incident uh critical incident and we're just gonna navigate directly instead of clicking on to here to form and create related lists and then clicking on this we're going to create a navigation function as a shortcut and and we'll do a swipe function as well so um let me get rid of all this so we're going to go to function let me expand this real quick so we're going to function there's a thing called as david mentioned there's a thing called navigation and we're going to create a nominate navigation function i'm going to go call it cp nav to um instant task and um it's going to be since it's going to be on the record uh we'll keep the context record and we're going to go to [Music] incident tasks right here and this is going to be the incident table hit save notice that it it automatically added the item the parameters because it knows that this is a prioritized output and all we have to do is just add the value the value is going to be the cis id okay so now we have the navigation function as mentioned earlier we have to associate this with the incident we have to put it on the incident outlet so let's go to the incident and since well it's actually it's critical incident this critical incident this applet and um because it's a list screen we're going to go to the function and we're going to do on the swipe function so click on here and let's just go to go to incident task and it's going to be a navigation function and it's called cp nav to instant task and we're going to make it to the left swipe all right so we just created a navigation function to take you directly into the oh so you click on see all right here you get a list of all critical incidents and then when you swipe you go to uh there's a navigation function click on this and now we're we're into the incident task related list applet and when i click on create new task notice that it's also carrying the incident sysid so again there's multiple ways of doing it um but the the thing about what what you want to do is make sure that on your function um on your function that the ui primer is uh toggle to carry and make sure you map it on your function instance carry parameters that's i have a question uh that some of people might be wondering how come there's no records being created on the instant task list so when you execute that action yeah ah very good so i haven't completed that yet uh this is something that you would have to do um but you could easily do it so basically let's let's let's do it um let's see i'm going to close this guy real quick so we're going to go over time by just a few minutes but uh feel free to stick on or uh we're going to open up to q a in about five minutes uh we'll stick around for a little bit longer whoever needs some of the questions answered yeah so um so the reason why it hasn't created anything is because it's scripted right because i'm using it to illustrate that the society is coming through as mentioned i can just go create new and we're going to go to critical no incident task and we're going to assign it to the incident with this incident id which is coming through this is our carry parameter now the thing that with uh instant tasks i think it requires short description so um let's let me double check that so incense i believe it's short description as well if it is then we can just create it so if i create a new incident task uh yeah it's required a short description so let's let's create it so on a parameter let's create a short description show short notice that i'm doing underscore description because it's just less common practice okay and so i'm going to map it to short description so we gotta reload the frame i didn't save my things so that's okay instead task and incident and map it to the carry parameters and then a short description is map it to our item parameter so that's done with the action item now we just added a new item parameter we have to go to the function and we have to ask um call it cp cp create function yeah down here somewhere okay so i'm going back to the function we since we added a new item primer we have to add this to the ui primer as well so let's create a new ui parameter and this is going to be called um short description notice that i'm just i don't have an underscore anything this is what the user will see so this is like the display value make sure that this is user input this text done so going to the item parameter going to the function ui parameter um notice that there's a short description there well the last thing is to map it so the item parameter is underscore it's short underscore description while the ui parameter is what the user will see is short space description and let's refresh that and hit save all right and we are done so let's test this out so let's go back to our critical incident um let's go to using our new swipe uh create new incidents there's our short description and i'm going to say um order macbook so if i refresh it notice how it just created an incident order macbook and you notice that because i it's using carry primer it knows that this is associated with this incident right here so that's how you do it it's how you create a new incident task sweet that was great demo food uh we have a question uh real quick so uh we have a question from dirk uh is there a way to navigate directly to that record once you uh create that record so typically when you create new records it keeps you within the list applet when i execute am i able to navigate directly to that record once i create it oh um you're saying navigate so when i create it navigate in directly to this carly no because when you create an incident it doesn't know anything about this this task yet so it doesn't you can't you can't navigate so so this uh right back function right here it doesn't uh there's my right back function this one right here okay so on on unsuccessful there's a thing called his jump to previous screen or refresh to previous screen um it doesn't have on success it jumps to it uh to this applet so when you create a new uh record uh it hasn't been created so it doesn't know what where to go yet so uh the question is is not yet um we don't have that ability yet i think a great place to uh submit this enhancement though is on mobile community there's an area called idea portal and if you submit your uh enhancements there it goes directly to our inbound teams backlog and we kind of further discussions from here so definitely check that out and uh please submit your enhancement there um we have another question too uh so we have vidya uh sagar who's attending mobile academy for the second time uh welcome back uh so his question is um he would like to understand how acls are evaluated when records are created updated or read from mobile um so i guess just a a general explanation on how acls are evaluated for mobile yeah so okay so acls are executed um when a condition is met so there are things that are scripted acls and um upon upon execution of a mobile applet for example or upon when you when you log in um ac that's when acos are triggered so um a good example is an acl uh that checks for cis uh that checks for um attachments uh so for example if you don't want to show attachments uh on for let me show you okay so you notice how there's um on the critical incident and there's here's an activity stream and uh you notice that when i click on this this add button i want to open a camera and i want to take a picture of and send this this attachment to this activity stream now and what acl does is that you can um disable all this stuff so when you log in all the acos will get executed and it will know it will apply the rules so there's an acl that says do not show attachments and when you enable that there's documentation on that or i can show you how to configure that it will disable all these features okay so it is it is executing upon um arrival of your when you go into the app sweet okay uh thanks for answering that question um one other question and i'll take that over and then we'll wrap up with this last question if there's any other questions please submit them on mobile community but i definitely want to address this last one so we have a question uh asking from uh samia can we rename details activity streaming early list so if i take over this screen share real quick i can show you that real quick um so i'm going to share my desktop so to rename uh activity streams in really list uh if i log back into this thing uh you're gonna notice that you know there's on the form there's no way to modify the names of these right um so what you'll actually have to do is you have to go into platform ui and find this uh screen so going back outside of mobile studio and i look up applets um and then i look up my critical incident uh critical okay it's a critical instance i think it's on this this one here so it's a mobile agent list screen um i know that it's on my form screen and this is my itself mobile agent scope so this is the right one here so here is all my screens and you can rename them here so if i want to change details to something else let's call this uh i don't know and then if i oh let's click into this to make sure i'm able to uh let's give it a second to load okay so uh i can rename this to test uh and then i can give it an icon so just uh something good to know um icons are only supported if the type uh isn't an image so image type icons aren't supported okay and it looks like the icon is actually blank here so this won't show up it'll show up as question mark but i just want to show you oh no not insert uh i wanted you know uh click save just click the wrong button okay so let's call this give it a random icon click save okay so now if i refresh to click into critical instance there you can see the the name of the segment being changed and then you can apply that to activity stream and so forth okay um already i think we have one more question on the function definition there's an option to capture a success message if i capture and mark jump to previous screen this shows an open text in the message shown in the mobile if i click that where should i get navigated to um let's see if i on the function definition there's an option to capture success message if i capture this and jump to previous screen this shows an open text in the message uh yeah david go to your function go to ceo and go to a function okay so you got to toggle that and then it gives you a destination applet uh so functions click yeah click any function go to get help hopefully it actually yeah should be an action okay so click on click on uh oh this is the oh this is a chat launcher so let's just click on ours the cp one okay we have to create a um it's a normal function it's an action item function yeah there we go is action item or action function it should be an action item the one you created clicked on there was the type was different so when is an action item you notice that you have all these these um these toggles so um so jump drop the screen after successful right back function execution so this is something that you might be interested in when you click on that there's a destination field that appears and this is the destination of your applet right and so the you can jump to it it's just that it doesn't know um like for example you want to drop a form it doesn't know like what what form you're going to um it should go to like a screen so that you know it goes back to like when you create a new incident um it goes back to the incident list yeah it goes it goes back to so dirk says that um that was also supposed to go after a successful insert so it should go back to uh to whatever destination screen you have configured is this something that you've done you want to unmute dirk oh yeah let's let's unmute jerk um sorry that we went a little over today uh but uh anyone who wants to continue listening to the answers questions we'll uh we'll stay on for now so dirk i'm going to unmute you and allow you to talk that way you can answer us directly hello thanks for letting me in can you hear me yeah we can hear you perfect perfect thanks uh so i was trying to understand how i can show a form after inserting a new record and what you showed just before is here you had this link or this button on the related list and you can add a new uh record there and as you understood from my first question how can i just move to this record that was inserted in this moment and i thought maybe these options are the right ones to say jump to screen after successful right back action and i i selected the form here for the destination screen and it opens one but it opens the one where i come from and not the new one maybe i i miss something uh so maybe the other way to achieve that yeah i think that's the that's i think that's the limitation so when you when you applied a destination screen uh where where did where are you sending it to are you sending it to the so for this incident are you are you going to the internet task related lists applet or are you going uh back to the parent i tried both i tried to create a new record from a form from a detail where i have definitely a sous id which which will come from and i tried from the list and both times i just want to say create a new record and after insert i just want to load this record and show it up in the in the destination form or applet that i can select here and that that was exactly what i was expecting to say you can select the destination screen here and move there and even it looks like that because if you go below and in the messages tab you can add maybe you can try just for a moment it type in a message on the messages tab and select this option because then when you save you will get a notification at the top screen which indicates an open link and if i tap that i think i can go there but i i'm not getting to the new record so that's that's the question how i can get there do you get the question yeah i do um i don't i don't know if i don't think that destination screen actually know the context of the form because it hasn't been created yet so it doesn't know like when i say context it doesn't know that you're going to the form that you just the ins the instant task related list that you just created because upon successful uh has to know how to pass and in this situation you're not passing anything um so i don't i don't think this is possible to do it but again i think i think we can go back and just test it ourselves yeah have you tried the auto redirection as well yes i i tried both i tried all options and maybe i saw this pass through or this what you showed with parameter forwarding that is still an issue but i'm not sure so but i think it should be a common use case to say create a new record and after creation you will be on the form to uh maybe add some related data or whatever so got it i think i've heard that before with multiple customers as well um okay right right now it just it just keeps you on the same um yeah the same uh applet yes definitely open up uh the ask on both community and the idea portal and we'll definitely follow uh with you on that perfect thanks a lot yeah and then i think the success question uh he he asked if you can click on the success mission it'll take you to the record isn't that possible for you it's dynamic it's it's just it's just a message it doesn't have any like javascript function where it doesn't redirect so what you can do in the success method you can add in curable braces and double braces you can fill in the society and it will show up for example right you you can you can dynamically label your things but upon like uh it's just a yes or no it doesn't have any like special um like action where it can go somewhere right i think there's notifications there right now all right yeah yeah even with push that's that's slow i don't think i don't know if that's gonna work maybe if you were to set a condition anytime a new record is created no well i think i think that we i think the if to do dirk stuff um we have to support client scripting because there is a there is a javascript function in platforms that you can actually redirect to anywhere um but that's that's a redirection to a web uh yeah but exactly which is different from mobile right natively it doesn't honor that javascript so i see where you're coming from dirk i think this is a very common use case do definitely submit an idea in the portal we'll follow that on there thanks sir thanks a lot thanks a lot thank you very appreciate that thanks were there any other questions before we wrap up uh let's see any other questions in the chat let's take a quick look oh it doesn't look like there's any other questions okay so let's go and wrap up today um sorry for going a little over uh but um thank you everyone for joining us in today's academy on how to configure navigations uh around your service time mobile labs hope you found this session uh was informative and helpful um if you have any additional questions feel free to keep posting them on the mobile community site so that we can continue exploring other configurations in the future we'll have another mobile app academy in two weeks so make sure to follow up on our mobile community site to get the latest dates and information thank you everyone for joining us today i hope to see you at the next mobile academy cheers thank you everyone

View original source

https://www.youtube.com/watch?v=BsALYoMVgwo