How Can We Help?
Problem
Sometimes, we want to show some controls only in mobile and hide in desktop or vice versa.
Solution
Write the below logic on the activityA specific step in a process. It will be the user interface for that step (web form or a screen), for example, the Leave Application (screen interface or web form) will be the first Activity in the Leave Requisition process. The Leave Application Authorization will be the second step or Activity in the Leave Requisition process. One Process can have multiple activities. load to determine if the form is being opened in the mobile app or browser, and logic to hide or show the controls accordingly.
Sample code
public void AP30Process_OnLoad() { ObjectGroup grp = activity.ObjectGroups["0"]; if (System.Web.HttpContext.Current == null || System.WebHttpContext.Current.Session == null) { //Mobile grp["AP30250QuickLinks"].Options["Visible"] = "False"; } else { //Desktop grp[AP30250QuickLinks"].Options["Visible"] = "True"; } }
In the above example logic, it checks using an if condition if the form is opened in browser or in a mobile app. It is also performing the logic to hide / show fields accordingly.
Comments are closed.