TL,DR; In EG: Should I use a stored process or a custom task if I want to initialize a UI to the last saved state?
We have a business process where an end user runs an EG project, and has to either:
Right now we're using macro variables, SQL passthrough processing, and the process is error prone.
The current table structure is flat. Very simplified dummy data:
length Project Service $20;
input Project Service;
I'm working on splitting the table into separate normalized tables using FK's. Again very simplified example:
length ProjectID 8 Project $20;
length ProjectID ServiceID 8 Service $10;
input ProjectID Service;
create view vwOperational as
That's probably overkill on the description of the business process. But, in summary, they need to either create a row or select an existing data, and IMO some sort of UI is the best approach and least error prone for the end user.
This is fairly simple drilldown processing in a stored process (at least for the select part). However, in the past, I could never get a stored process to save and restore state. IOW, I can create a UI where the user drills down to a row, but the next time he/she has to select all over again. There's no way to initialize the stored process to the last saved state. For example, by setting a macro variable, and have the stored process pre-selected to that macro variable.
I'm thinking the best approach may be a custom task which would display the UI, allow the user to create a new project and/or service, select an existing project/service, and save the state so the next time the user runs the project they don't have to select again. I'll have to work out the best approach to save state (XML/JSON), and store this in a place (UNC path) accessible to both the custom task and the SAS workspace server. I'd like the option for the user to not have to display the UI, in which case some macro variables would be set from the previous state (i.e. read the XML/JSON).
What I really want is SAS/AF for EG ;-). But I guess you can say that's analogous to a custom task?
Apologies if this is cryptic. I can provide more details if needed.
Your thoughts? How would you approach this?
For sure, it can! As for where, it depends on your UI type and use case.
If you wish to build apps on SAS you already have your 'AF alternative'. It's free (mostly), and immensely powerful, and you've probably used it before.
You can save state in users browsers through cookies or local storage. You save state at the backend through network drives (like you say) or a database.
Some resources for this approach:
Building Web Apps
Build an app in 10 minutes; https://drive.google.com/file/d/1kAbbKDYWZ1wmgLWiwTYctR4QbQzxLlWX/view
Build an app in 5 minutes: https://vimeo.com/349223867
Existing Web Apps
Data Controller - https://datacontroller.io
Metadata Explorer - https://github.com/Boemska/metanav
User Navigator - https://github.com/Boemska/user-navigator
If you'd like to get stuck into building web apps on SAS I'd be happy to talk more, just drop me a PM.
Hi @AllanBowe ,
I think this would be really cool. But...
1) How would I integrate this with EG, which is the tool my end users use?
2) How do I create this if I don't have access to a web server in my environment?
Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.
Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.