Search code examples
mdriven

Serverside viemodel to use server's name in RestPost


I use serverside job (viewmodel) to inform another not mdriven service via restpost periodically. And I have the stupid question - how to get MDrivenServer computer's name in the viemodel? Is there something like "string.currentuser" but for the computer's name? Thank you!


Solution

  • You do not have access to the computers name from with the serverside job. But you can give your MDrivenServer variables that you can access.

    This way you can have a variable vComputerName:string defined in your server, assign it a value once and for all: vComputerName:='TheCorrectName'

    If your ServerSideViewModel has a matching variable : vComputerName:string it will be set prior to execution.

    Image of MDrivenServer ServerSide Actions