Pages:
Actions
  • #1 by 3daydealer on 05 Jun 2019
  • Hi
    I am pulling selections in for a .txt file and it refreshed and imports them successfully, the problem I am having is that sometimes in my txt file the selections do not have a stake next to them (separated by a tab), what I need is an iferror statement which says if it cannot find a stake for imported_1 then just use the default_backa

    I cannot for the life of me work out what needs to go into the liability stake part of the back sp block.
  • #2 by Oxa (WellDoneSoft) on 12 Jun 2019
  • Hello!

    The solution is non-trivial because imported_1 will return an empty space (not a zero) if you leave it out in the text file.

    So you need to insert this formula into the Amount field:

    IF(imported_1+0 > 0.05, imported_1+0, default_backa)

    The trick here is that is imported_1 is empty, the expression will be down to: 

    IF(+0 > 0.05, +0, default_backa)

    which is a perfectly valid trigger expression, and it will return default_backa.

    On the other hand, if imported_1 has some value, e.g. 3.5, then 3.5 + 0 will still be 3.5, so this won't affect your staking plan.
Pages:
Actions