- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to use an external rule to add iProps & then use any field data already present to calculate cost.
The adding of the iProps is (for the most), sorted. What I need to do next is:
- Convert text from iProps to numbers
- Perform a calculation using two or more of the conversions
- Populate the calc result to another iProp
So I want "Unit_Buy". This will be the result of "Unit_Trade" with "Discount" applied.
Here's what I have so far for the conversion of "Unit_Trade":
Dim Unit_Trade As String = iPropGetStr("Unit_Trade", "0") Dim Unit_Trade_NUM As Integer = iPropGetStr("Unit_Trade_NUM", (Int32.TryParse(Unit_Trade, Unit_Trade_NUM))) Dim Discount As String = iPropGetStr("Discount", "0") Dim Discount_NUM As Integer = iPropGetStr("Discount_NUM",Int32.TryParse("Discount", Discount_NUM))
During the development of the iLogic, I've added an iProp from "Unit_Trade_NUM" so I can see if it works. It doesn't. The iProp is added with the format YES/NO.
The workflow at present is:
- Run the rule
- Add data to the empty fields on a form that loads
- Close form & re-run rule
Before each time for step 1 above, I make sure any existing iProp with the format Y/N is deleted, so the rule will add it.
I'm not sue if I've got the syntax for the TryParse correct, or have I have missed something else entirely?
Solved! Go to Solution.