![]() Let cfparz := xCog + xNom + substring(text(year(BirthDate)), 2, 4) + item("ABCDEHLMPRST", month(BirthDate) - 1) + switch Sex do Let xVocNom := replacex(xPNom, "", "g", "") Let xConNom := replacex(xPNom, "", "g", "") Let xPNom := replace(upper(FirstName), " ", "") Let xCog := substr(xConCog + xVocCog + "XXX", 0, 3) Let xVocCog := replacex(xPCog, "", "g", "") Let xConCog := replacex(xPCog, "", "g", "") Let xPCog := replace(upper(LastName), " ", "") ![]() If LastName = null or FirstName = null or Sex = null or CodiceComune = null or BirthDate = null then Here's the global function: function CF(LastName : text,FirstName : text,Sex : number,BirthDate : date,CodiceComune : text) do I don't have an extra field, just a temporary variable for the search result. You say the second way works, but forces you to create an extra field. So I'll copy everything into this answer. I can't export the database I modified - don't know how. However, you're one step ahead of me, when it comes to exporting. If you're still unsure, you have to tell me, what kind of table is used for the dynamic choice and which field you like to use. And before calling CF, you extract that data from the requested record. ? Then you just define FieldE with that data type. What type of data do you exactly need from the dynamic selection? Is it a number, a string. You extract the necessary data before calling the function CF. Inside the function, you get the record that contains the data and only then, you can use the content.Īctually, there's a second way to solve the issue (there's always a second way) - maybe it's simpler. > You pass the id of the selected record to the function CF. Let selectedrecord := record(tableofselection, FieldE) ĬompleteFormula *the actual formula that uses FieldA to FieldD and selectedrecord* Inside the function it should now look like this (and I assume, that the dynamic selection is pointing to a table named "tableofselection") function CF (FieldA: text, FieldB: text, FieldC: date, FieldD: number, FieldE: number) do ![]() Now, the id of the selected record is passed to the function CF. Result := CF(first, second, third, fourth, number(nameOfYourDynamicSelection)) Īnd "nameOfYourDynamicSelection" is the name of the field that contains the dynamic selection. and let's assume, you already have all parameters to pass. I don't know if CF returns any value, but let's assume it does. So in the main script, where you call CF, it should look something like this. Gianluca it's a bit difficult if I don't know have enough knowledge about your structure and the names of your tables, but I try.įirst of all, you call the function already with the result of the dynamic choice selection.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |