360works/fmangular — pull request #1 by mw777rcc (2014-11-10 08:18:13+00:00)
Title: Update to fmangular to add support for -view

I added a new function parseViewResponse and logic in createConvenienceMethod to handle the -view command to get layout information with FMPXMLLAYOUT. This version returns database name, layout name, a valuelist object which can be used as follows...

fmangular.view({'-db':'BC8_Master', '-lay':'L292_Timekeeping_web'}).then( function(found){
$scope.valuelists = found.valuelists;
});

{{value.display}}

{{value.display}}

Next option could be to pull in the layout information which gives a list of the fields with their type (drop down, etc) and their valueList that is assigned and then write a function that would put out the proper html for the type of field it is on the layout. P.S. Sorry, I am newer to Github and I obviously didn't put my code in correctly because it shows a full deletion and addition. Next time, I will paste in the relevant pieces to show changes more clearly.