26.09. Custom data

Custom data allows you to add data to mSupply that doesn't naturally fit into one of the existing fields.

  • Choose Special > Show custom data… to show the list of custom data sets.

  • Click New
  • This window is shown:

  • For our example, we're going to record population in several regions each year, so we need
    • A real number field to store the population number
    • A text field to store the region name
    • A date field to store the year
  • We've labelled the data set RegionalPopulations
  • To change the field names, click once on the name, and then wait a second or two and click again- now it is editable:

  • Click the data tab then click New

  • You can extract data by using the following method in a pagepro report
  • custom_value_get(“data_set”;“field_to_query”;“search_value”;“field_to_return”;→“variable_to_return”)
    • “data_set” is the name of the data set. e.g. "RegionalPopulations"
    • field_to_query is the internal name of the field “text_1” , “Text_2”, “real_2”, “date_7”
    • “search_value” is the value you're looking for in “field_to_query”
    • “field_to_return” is the field name of the value to return
    • “variable_to_return” is a pointer to the variable that will contain the data returned.
  • Sound too complicated? We usually build these reports for clients, but this documentation is for the technically minded who want to build their own.

  • Last modified: 2022/02/11 15:47
  • by Gary Willetts